CSS Icons

CSS Icons can be defined as the images or symbols used in any computer interface refer to an element. It is a graphical representation of a file or program that helps the user to identify about the type of file quickly.

Using the icon library is the easiest way to add icons to our HTML page. It is possible to format the library icons by using CSS. We can customize the icons according to their color, shadow, size, etc.

There are given some of the icon libraries such as Bootstrap icons, Font Awesome icons, and Google icons that can be used in CSS easily. There is no need to install or download the libraries mentioned above.

CSS Icons

CSS Icons- Font awesome

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:

For example

  <body style="text-align:center">   
<h1>Font Awesome Library</h1>  
      <i class="fa fa-cloud"></i>   
      <i class="fa fa-file"></i>   
      <i class="fa fa-heart"></i>   
      <i class="fa fa-bars"></i>   
      <i class="fa fa-car"</i>   
</body>   
   

Bootstrap Icons

To use the Bootstrap glyphicons, add the following line inside the <head> section of your HTML page:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

For example

<h1>Bootstrap icons</h1>  
      <i class="glyphicon glyphicon-cloud"></i>   
      <i class="glyphicon glyphicon-file"></i>   
      <i class="glyphicon glyphicon-heart"></i>   
      <i class="glyphicon glyphicon-user"></i>   
      <i class="glyphicon glyphicon-thumbs-up"></i>   
      <i class="glyphicon glyphicon-remove"></i>  
      <i class="glyphicon glyphicon-envelope"></i>   

Google Icons

To use the Google icons, add the following line inside the <head> section of your HTML page:

<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>