CSS | Icons
Icons can be added to our HTML page with icon library. All the icons in the library can be formatted using CSS. They can be customized according to size, color, shadow, etc.
Types of icon library:
- Font Awesome Icons
- Google Icons
- Bootstrap Icons
Note: All the above-mentioned library does not require any downloading or installation.
Font Awesome Icons: To use Font Awesome Icons add the following link inside <head> section.
<link rel="stylesheet" |
Example 1:
<!DOCTYPE> <html> <head> <link rel="stylesheet" </head> <body> <h1> GEEKSFORGEEKS </h1> <i class="fa fa-cloud" style="font-size:32px;"></i> <i class="fa fa-heart" style="font-size:32px;"></i> <i class="fa fa-file" style="font-size:32px;"></i> <i class="fa fa-car" style="font-size:32px;"></i> <i class="fa fa-bars" style="font-size:32px;"></i> </body> </html> |
Output:
Example 2:
<!DOCTYPE> <html> <head> <link rel="stylesheet" </head> <body> <h1> GEEKSFORGEEKS </h1> <i class="fa fa-heart" style="font-size:28px;color:red;"></i> <i class="fa fa-heart" style="font-size:30px;color:blue;"></i> <i class="fa fa-heart" style="font-size:32px;color:red;"></i> <i class="fa fa-heart" style="font-size:34px;color:blue;"></i> <i class="fa fa-heart" style="font-size:36px;color:red;"></i> </body> </html> |
Output:
Google Icons: To use Google Icons add the following link inside <head> section.
|
|
Example 1:
<!DOCTYPE> <html> <head> </head> <body> <h1> GEEKSFORGEEKS </h1> <i class="material-icons">cloud</i> <i class="material-icons">favorite</i> <i class="material-icons">attachment</i> <i class="material-icons">computer</i> <i class="material-icons">traffic</i> </body> </html> |
Output:
Example 2:
<!DOCTYPE> <html> <head> </head> <body> <h1> GEEKSFORGEEKS </h1> <i class="material-icons"style="font-size:30px;">cloud</i> <i class="material-icons"style="font-size:40px;">cloud</i> <i class="material-icons"style="font-size:50px;">cloud</i> <i class="material-icons"style="font-size:60px;">cloud</i> <i class="material-icons"style="font-size:70px;">cloud</i> </body> </html> |
Output:
Bootstrap Icons: To use Bootstrap Icons add the following link inside <head> section.
<link rel="stylesheet" |
Example 1:
<!DOCTYPE> <html> <link rel="stylesheet" </head> <body> <h1> GEEKSFORGEEKS </h1> <i class="glyphicon glyphicon-cloud"style="font-size:28px;"></i> <i class="glyphicon glyphicon-user"style="font-size:30px;"></i> <i class="glyphicon glyphicon-thumbs-up"style="font-size:32px;"></i> <i class="glyphicon glyphicon-remove"style="font-size:34px;"></i> <i class="glyphicon glyphicon-envelope"style="font-size:36px;"></i> </body> </html> |
Output:
Example 2:
<!DOCTYPE> <html> <link rel="stylesheet" </head> <body> <h1> GEEKSFORGEEKS </h1> <i class="glyphicon glyphicon-thumbs-up"style="font-size:20px;"></i> <i class="glyphicon glyphicon-thumbs-up"style="font-size:30px;"></i> <i class="glyphicon glyphicon-thumbs-up"style="font-size:40px;"></i> <i class="glyphicon glyphicon-thumbs-up"style="font-size:50px;"></i> <i class="glyphicon glyphicon-thumbs-up"style="font-size:60px;"></i> </body> </html> |
Output:
Recommended Posts:
- How to detect operating system on the client machine using JavaScript ?
- What is the difference between children and childNodes in JavaScript?
- 5 Must Have Tools For Web Application Penetration Testing
- How to create hash from string in JavaScript ?
- TCS Digital Interview through Codevita'19
- CSS | perspective() Function
- PHP | Imagick levelImage() Function
- Why Serverless Apps?
- BabyChakra Interview Experience
- How to create a custom callback in JavaScript?
- How to place the image above the slider in mobile view in bootstrap?
- How to get the same behavior with confirm and bootstrap modal?
- Web DOMRect API | DOMRect() Constructor
- CSS | skewX() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




