Creating Animated Social Media Icons

Hey Folks, in this article, we will show you how to create  Animated web-based(Social) media icons using HTML and CSS.
Before creating lets know what are these and where to use it.

What are Social Media Icons?

Social media icons are used to provide your audience with a way to connect with your brand on various social media platforms. This is why these icons should always link back to your company's account on a specific platform, rather than the home page itself.
You'll need to include social media icons in your marketing materials to let people know where to follow you. ... Despite the ubiquity of icons in all shapes, colors and sizes online, social media icons are registered trademarks. They are protected by copyright and enforceable brand guidelines.

Creating with HTML

Here I am using Font awesome icons so I have to include CDN of font awesome in header. You can use others icons to create. It's optional depends you. But you have to include any one of them. You can see the Font Awesome CDN link below.


After this let's create div box using <div> tag. I used two div elements with different class selectors for styling. one class is "ct icons" and another one is "social-icons". We are using <i> (italic) tag to acces the font awesome icons.

HTML Code:


In the code you can see href="#", here you have to just replace the "#" with your social media platform links.

Styling with CSS

Here we are using internal CSS in a HTML document. We are important "Poppins" font using CSS. We can import through a link also as we imported font awesome icons CSS document. we are styling the icons as buttons using basic CSS and selectors like ::before, ::after, :hover. You can see the code below.

CSS Code:


The ::before selector inserts something before the content of each selected element(s).

The ::after selector inserts something After the content of each selected element(s).

The :hover selector is used to select elements when you mouse over them.

Full Code:

CodePen Output:

See the Pen Social Media Icons by Coding Taggers (@codingtaggers) on CodePen.