Adding a Pinterest button to your website


HTML

At the time of posting this, Pinterest is currently ranked #34 globally out of ALL websites in the world. That being said, Pinterest plays a major role in social media for sharing your photos, videos, etc.

You can easily add a Pinterest button to your website using the following code.

<a href="http://pinterest.com/pin/create/button/"><img alt="Pin it" src="//assets.pinterest.com/images/PinExt.png" /></a>
<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>

But wait! You say you don’t like the default “Pin It” image? Well, there is a fix to that!

As you can see in the code above there is:

<img alt="Pin it" src="//assets.pinterest.com/images/PinExt.png" />

To add your very own image, all you need to do is add the link to your image between the quotes after src= like so:

<img alt="Pin it" src="http://tutorialblock.com/images/pinterest-button.png" />

Then the final code again:

<a href="http://pinterest.com/pin/create/button/"><img alt="Pin it" src="http://tutorialblock.com/images/pinterest-button.png" /></a>
<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>
Category: HTML  Tags: ,

Leave a Reply

You can follow any responses to this entry through the RSS 2.0 feed.You can leave a response, or trackback from your own site.
  • Advertisements