How to use font awesome icon?

Font Awesome is a great icon font library and CSS framework.

The Font Awesome font gives you a scalable vector icon that can be custom sized, colored, shaded, and any style that can be styled with CSS.

To use the Font Awesome icon, add the following line to the section of the HTML page:

Recommended CDN:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

You can use the prefix fa and the name of the icon to place the Font Awesome icon.

<i class="fa fa-car"></i>
<i class="fa fa-car" style="font-size:48px;"></i>
<i class="fa fa-car" style="font-size:60px;color:red;"></i>

Font Awesome is designed to work with inline elements. The <i> and <span> elements are widely used for icons.

Also note that if you change the font size or color of the icon container, the icon changes.