bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/CSS/CSS Foundations
CSS•CSS Foundations

CSS Icons - Font Awesome

Concept visual

CSS Icons - Font Awesome

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

How To Add Icons

Icons can easily be added to your HTML page, by using an icon library. Just add the name of the icon class to any inline HTML element (like <i> or <span> ). Icons from icon libraries are scalable vectors that can be customized with CSS (size, color, shadow, etc.).

Font Awesome Icons

To use the Font Awesome icons, go to fontawesome.com, sign in, and get a code to add in the <head> section of your HTML page. The code looks something like this: <script src="https://kit.fontawesome.com/ yourcode.js" crossorigin="anonymous"></script>

Read more about Font Awesome in our

Font

Awesome Tutorial.

Note:

No downloading or installation is required!

Example

<!DOCTYPE html> <html> <head>

Formula

< script src ="https://kit.fontawesome.com/a076d05399.js" crossorigin ="anonymous"></script >

</head> <body>

Formula

< i class ="fas fa - cloud"></i >
< i class ="fas fa - heart"></i >
< i class ="fas fa - car"></i >
< i class ="fas fa - file"></i >
< i class ="fas fa - bars"></i >

</body> </html>

Result:

For a complete reference of all Font Awesome icons, visit our Icon Reference.

Previous

CSS Font Property

Next

CSS Icons - Bootstrap