How to add a share to Twitter button in your website?

Do you want your visitors to share your website on Twitter?



Then follow these instructions

Add this code in HTML

<a href="https://www.twitter.com/share?url=http://www.example.com" target="_blank" class="tweet">Share to Twitter</a>

Add the following styling in <head> section.

<style>
.tweet {
       background-color: #1da1f2;
       text-decoration: none;
       color: white;
       padding : 4px;
       border-radius: 8px;
}
</style>

Demo with our blog styling.

Note: It would look much better on your website.

Comments