How to use icons in HTML code? | SoloLearn: Learn to code for FREE!


How to use icons in HTML code?

How to use icons in code from existing sources in HTML?

8/2/2019 11:58:16 AM


11 Answers

New Answer


Now I got it, how to use icons from font-awesome, I used in my login form code, anybody can check it..


Shikha it's imported in css


Icons are added via css you make a sprite, add through a pseudo-class and place it.


No, Thống Nguyễn in my html code I want to use icons from font-awesome, I tried but it's not working.. So I want to know how to use from there or any other sources


Thanks Thống Nguyễn


CDN not included in head part


Spl post the code in which you are trying to use fontawesome icons


Oh, that is simple. First, you need to know wich version you want to use (the icon class name is different on other versions). Then embed the right version on your html code (there are several way to do that) you can search for awesome font install and read the instruction. For now i prefer you to try my favorite version by adding this code inside your head section of your code: <link rel="stylesheet" href=""> this is version 4.7, then just find the class name of the icon you want, and insert this code in where you want to use in your code: <i class="fa fa-car"></i> ("fa fa-car" is the class name of the icon).


I don't actually understand your mind. You want to use icons witch you like from other HTLM in your code. Am i right?


By the way, this is the best awesome font i found, just take a look: