You can place Font Awesome icons just about anywhere, and we've tried to make it so that icons will take on the characteristics and blend in with surrounding text naturally.
Advertisement
Remove ads with a Pro plan!
A subscription to a Pro-level plan will remove all third-party advertisements on fontawesome.com.
And of course Pro-level plans come with…
All 26,233 icons in Font Awesome
5 Classic styles of every icon
3 Sharp styles of every icon
A Perpetual License to use Pro
Services and tools to make easy work of using icons
We’ll cover the basics of how to add icons to your project, shorthand class names for different icon styles, how to add icons to HTML, using icons aliases, and more!
To add an icon, you need to know a few bits of information:
The shorthand class name for the style you want to use
The icon name, prefixed with fa- (meaning "Font Awesome" naturally!)
The shorthand class name for the family you want to use Optional
Families + Styles
There are three families of Font Awesome icons - each with a unique look, class name, and @font-face font-family. In both Font Awesome Classic and Sharp, there are five styles of Font Awesome icons. Here are some examples:
If you don't specify a family class name, our styling toolkit will render icons in Font Awesome Classic, the original look and feel that's always in style. But if you need to reference the Classic family, you can just add the fa-classic in your icon's HTML class names. If you want to change any or all icons to use Sharp, just add fa-sharp in the same manner!
Add Icons to HTML
Advertisement
Remove ads with a Pro plan!
A subscription to a Pro-level plan will remove all third-party advertisements on fontawesome.com.
And of course Pro-level plans come with…
All 26,233 icons in Font Awesome
5 Classic styles of every icon
3 Sharp styles of every icon
A Perpetual License to use Pro
Services and tools to make easy work of using icons
We designed Font Awesome for use with inline elements, and we recommend that you stick with a consistent element in your project. We recommend using <i> element with the Font Awesome CSS classes for the style class for the style of icon you want to use and the icon name class with the fa- prefix for the icon you want to use. Accessibility-minded folks may want to opt for the <span> element instead of <i>.
Here's an example:
<!-- This example uses <i> element with:
1. the `fa-solid` style class for solid style
2. the `user` icon with the `fa-` prefix --><iclass="fa-solid fa-user"></i><!-- Or you can use a <span> element, with classes applied in the same way --><spanclass="fa-solid fa-user"></span>
Setting Different Families + Styles
And here's an example that references different styles and families of icons:
<!-- all styles of icons (in Font Awesome Classic by default) --><iclass="fa-solid fa-user"></i><iclass="fa-regular fa-user"></i><iclass="fa-light fa-user"></i><iclass="fa-thin fa-user"></i><iclass="fa-duotone fa-user"></i><!-- a Brands icon --><iclass="fa-brands fa-font-awesome"></i><!-- a specifically set Font Awesome Sharp Solid icon --><iclass="fa-sharp fa-solid fa-user"></i><!-- a specifically set Font Awesome Sharp Regular icon --><iclass="fa-sharp fa-regular fa-user"></i><!-- a specifically set Font Awesome Sharp Light icon --><iclass="fa-sharp fa-light fa-user"></i>
Font Awesome Sharp requires Pro and specific versions!
When using our SVG framework, remember that DOM elements with Font Awesome classes are replaced with injected <svg> elements by default. Be sure that your CSS rules target the right element.
Aliases
Advertisement
Remove ads with a Pro plan!
A subscription to a Pro-level plan will remove all third-party advertisements on fontawesome.com.
And of course Pro-level plans come with…
All 26,233 icons in Font Awesome
5 Classic styles of every icon
3 Sharp styles of every icon
A Perpetual License to use Pro
Services and tools to make easy work of using icons
We've updated many of our icon names in Version 6 to make them more universal and consistent. But we wanted to make sure not to break your existing code, so we made aliases for renamed icons to allow them to work with either the old or new names.
And you can use the old or new name for styles as well. So you can still use fas, far, fal, fad, and fab. And we've also included older prefix versions for our new Thin style (fat) and new Sharp family of styles (Sharp Solid is fass while Sharp Regular is fasr).
<!-- All of these code snippets will render the same Solid icon thanks to aliases. --><iclass="fa-solid fa-cutlery"></i><iclass="fa-solid fa-utensils"></i><iclass="fas fa-utensils"></i><!-- All of these code snippets will render the same Sharp Solid icon thanks to aliases. --><iclass="fa-sharp fa-solid fa-times"></i><iclass="fa-sharp fa-solid fa-close"></i><iclass="fass fa-xmark"></i>
Alternate Ways to Add Icons
Advertisement
Remove ads with a Pro plan!
A subscription to a Pro-level plan will remove all third-party advertisements on fontawesome.com.
And of course Pro-level plans come with…
All 26,233 icons in Font Awesome
5 Classic styles of every icon
3 Sharp styles of every icon
A Perpetual License to use Pro
Services and tools to make easy work of using icons