freeCodeCamp/guide/english/miscellaneous/add-font-awesome-icons-to-o.../index.md

883 B

title
Add Font Awesome Icons to Our Buttons

Add Font Awesome Icons to Our Buttons

Font Awesome is a convenient library of icons. These icons are vector graphics, stored in the .svg file format. These icons are treated just like fonts. You can specify their size using pixels, and they will assume the font size of their parent HTML elements.

Heres how you add an icon:

<i class="fa fa-thumbs-up"></i>

Here is how you would insert that icon on to a button:

<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>

More Information:

Get font awesome on your website: Font awesome - Get started

Check out all the available font awesome icons: Icons