All TalkersCode Topics

Follow TalkersCode On Social Media - A Social Media Network for developers Join Now ➔

How To Add Social Media Icons In HTML

Last Updated : Mar 11, 2024

How To Add Social Media Icons In HTML

In this tutorial we will show you how to add social media icons in HTML, there are generally many ways to add social media icons in your html page. By adding social media icons, the webpage or website seems to be more attractive or socialized according to modern time.

All this is a way to link your social platforms to your webpage as a reason to sponsors or anything else according to editor’s choice.

Step By Step Guide On How To Add Social Media Icons In HTML :-

1. By using font awesome iframes

As general, we know fontawesome is mainly known as to provide free icons, sorry for known as to provide free use of icons in our webpage.

Hence, with the help of fontawesome, we are able to add icons in our webpage. For this, we have to go fontawesome official website and have to search for icons what we want to use.

After clicking on it, we have to copy the code that starts with <i> and ends with </i>. The first opened tag has also some additional classes in it. A general use of image tag with the help of codes is given here.

<!DOCTYPE html>
          <title> Title of the document<title>
<link rel="stylesheet" href="" integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
		<i class="fa-brands fa-paypal"></i>
		    <i class="fa-brands fa-amazon-pay"></i>
  1. First, we write <! DOCTYPE html> which we used as an instruction to the web browser about what version of HTML file is written in.
  2. Secondly, the <html> tag is used to indicate the beginning of an HTML document.
  3. As above now <head> tag is used to contain information about web page. In this tag a <title> tag is used which helps us to specify a webpage title. Both <head> and <title> tags are Paired tags. So, both have </head> and </title> ending tags respectively.
  4. But, here before closing head tag, we have to add a link, which is the link of fontawesome cdn. For this search only fontawesome cdn on google and from cdnjs website copy first link by clicking on second icon. Now, paste it in head tag.
  5. Here, we use an example of PayPal or amazon-pay. You also can know about this by seeing the HTML code because the icon name is also mostly embedded between lines of codes which you copy from font awesome.
  6. Thirdly, <body> tag is used to define the webpage body. All the contents to show on website are written here. Now, here we have to paste the codes which we copy from fontawesome website. These codes are for your specific icons which we want to show.
  7. Now, open this HTML code on your browser, but before this you must have an internet connectivity to your desktop because it works with online sources only.
  8. At last, the <body> and <html> tags are closed with </body> and </html> respectively.

Conclusion :-

At last, we can insert any icon in the html webpage, here we use an example of PayPal and amazon pay. But with your creativity skills you able to do as such things you want. I hope this tutorial on how to add social media icons in HTML helps you.

Author Image About Ashish

Ashish is a dynamic and motivated individual with a passion of programming and an experienced programmer having 3+ years of experience in various languages like Java, Python, HTML, CSS, JavaScript, jQuery and various frameworks like Bootstrap

Follow Ashish On Linkedin 🡪