1. Home
    Home Page
  2. Tax
    Income Tax & Other Taxes
  3. Forms
    Fillable Forms
  4. Finance
    Personal Finance
  5. PPF
    PPF Calculator, forms, Rules & Info
  6. SSY
    SSY Calculator, form, Rules & Info
  7. Widgets
    Complete code / Embed code
  8. Misc.
    Misc. scripts, calculators & utilities
Home  ❯  Misc.  ❯  Share Buttons

Easy Social Media Share Buttons for Web Page

Add Social Share buttons to your Webpage in an Easy Way by only CSS and plain JavaScript. The code automatically writes URL and Titel text of the page being shared. The code given on this page includes CSS and JavaScript Code for adding Social Media buttons for Facebook, Twitter, WhatApp and Linkedin. You may add more buttons by visiting the website of the social media page to get the "Share URL" and amend the CSS and JavaScript Code given below.

Demo of Share buttons

How to Add Social Media Share buttons :

  1. Get Font Awesome for Social Media icons. The code is given below.
  2. Copy the CSS Code given below in the Head of the page or include it in your main CSS file.
  3. Copy the Javascript Code given below in the Head of the page or include it in your main JS file.
  4. Create <div id='share1' class='sharebutton'></div> in the body of the page where you want Share Buttons to appear.
  5. The Javascript code will automatically add Share Buttons on Window Load.

Updated : Mar 01 , 2021