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:
- PHP Interview Questions and Answers | Set-2
- How to Create a Tab Image Gallery ?
- XML full form
- How to create an Affix or sticky Navbar ?
- How to add float numbers using JavaScript ?
- How to send email with Nodemailer using Gmail account in Node.js ?
- PHP | ReflectionExtension getFunctions() Function
- PHP | ReflectionExtension info() Function
- PHP | Imagick setLastIterator() Function
- PHP | Imagick sigmoidalContrastImage() Function
- PHP | ReflectionExtension getVersion() Function
- PHP | ReflectionClass implementsInterface() Function
- PHP | ReflectionExtension getClasses() Function
- PHP | ReflectionExtension getINIEntries() 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.


