How to Replace Text with Social Icons Using CSS

Last Updated on January 18, 2022 by Roshan Parihar

In this tutorial, learn how to replace text with social icons in CSS. The short answer is to hide the text and use the :before CSS selector and add font awesome icons using content codes.

Texts like Facebook, Twitter, and others are not easily attracted users to see and share the content of your website. You can easily convert them into social sharing icons to grab the attention of your audience. This helps them easily see the social sharing icons to get your content shared.

So, let’s convert these texts into social icons with the examples given below.

Normal Text Content without Any Icon

If you don’t use social share icons on your content, the text will appear as simple content which is difficult for users to identify. Your users will not find them within your content and you may lose social sharing of your content from them.

Here is the view of text without social icons:-

Output

  • Linkedin
  • Pinterest

The above example shows social text content that is not easier to identify inside your post content. You have to convert them into social media icons to easily identify social sharing icons inside your content.

Sp, let’s see how you can convert them into social icons in the below section.

How to Replace Text with Social Icons Using CSS

To replace text with social icons using CSS, you have to first hide the text content with display:none property. After that, you have to use the font awesome family and codes for each social media platforms as given in the example below.

Output

When you check the result in the above example, you can easily find that it’s easier for your users to identify social icons inside your content. People come to your website content, easily find these social sharing icons, and give your more sharing of your content to different social media platform.

You May Also Like to Read

I hope you like this post on how to replace text with social media icons using CSS.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.