- Use Font Awesome on the Web
- Remove ads with a Pro plan!
- And of course Pro-level plans come with…
- Setting Up on the Web
- Use a Kit
- In a Hurry? Try Our Quick Start.
- Host Yourself
- Upgrade from Earlier Versions of Font Awesome
- Use Font Awesome npm Packages
- Add Font Awesome Icons to Your Project
- Remove ads with a Pro plan!
- And of course Pro-level plans come with…
- How to add font awesome in CSS
- 4 Answers 4
- Get Started
- Icons on your site. Fast.
- Super-simple upgrades
- Auto accessibility support
- Async your icons
- Download & Customize Easy
- Using CSS
- Using Sass or Less
- Advanced & Packages Pro
- Less Ruby Gem
- Sass Ruby Gem
- More Information
- Validators
- Internet Explorer 8 and @font-face
- Need IE7 Support?
- Troubleshooting
Use Font Awesome on the Web
Get set up, add icons and style, or fine-tune – we’ve got what you need to know to use Font Awesome icons on the web.
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…
Get Font Awesome Pro for only $99/yr
Setting Up on the Web
There are a few different ways to set up Font Awesome. We suggest using a kit since it’s easy, fast, and customizable.
Use a Kit
Like a CDN just for you! Adjust the settings, get auto-subsetting, upload your own icons, and lots more goodies.
In a Hurry? Try Our Quick Start.
Create a kit, add some icons, sprinkle in some style, and you’re off and running!
Host Yourself
Take the wheel and drive how you want when you host yourself.
Upgrade from Earlier Versions of Font Awesome
Are you a Font Awesome OG using Version 5, or even 4? You can easily upgrade to Version 6.
Use Font Awesome npm Packages
Get all the awesome packed up to-go in our npm packages.
Add Font Awesome Icons to Your Project
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…
Get Font Awesome Pro for only $99/yr
You can add icons to your web projects with a little bit of code — it’s easy once you have a few of the basics under your belt.
How to add font awesome in CSS
I am trying to add a an icon from font awesome but for some reason it does not appear when I load the page. Below is my html code in which I attempted to add the font awesome in different ways.
Dummy Text
Try loading the font-awesome from https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css instead of your local files
It worked perfectly. Still wondering the possible reason for the other way not working but will use that way so long.
4 Answers 4
You can add font-awesome css file in your «main.css» file
@import url('/font-awesome-4.6.3/css/font-awesome.min.css');
If you are planning to use CDN just add one line it to your css file (i.e. main.css) indicating from where the font style should be imported
@import url('https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
source of the link used in the example above: https://www.bootstrapcdn.com/fontawesome/
Try to call form font-awesome like this:
Or if you try from your site folder then download font-awesome and add fonts into your fonts folder and add font-awesome css into css folder then call it like this:
What you put in your link is the name of your folder.You should put the name of the file instead(font-awesome)
On the font-awesome folder look for the file called font-awesome,copy and paste on your browser text field so that you can see the correct path. Copy that path and paste in your link like this:
Just check the path correctly cause I see no other mistake. let me know if it does not work.
Get Started
Font Awesome CDN is the easiest way to get Font Awesome on your website or app, all with just a single line of code. No downloading or installing!
We create new embed codes for each website so you can quickly upgrade and change your preferences all without ever pushing code. To do this, we need an email address so we know which embed codes are yours and so you can come back and manage them.
Icons on your site. Fast.
Don’t mess with files locally or in production. You’ll get all of Font Awesome’s 675 icons plus CSS toolkit — all optimized for speed and no hassle.
Super-simple upgrades
Since each site gets a unique embed code, you can easily upgrade to the latest version of Font Awesome, all without pushing any code. Easy peasy.
Auto accessibility support
Font Awesome CDN helps you automate accessibility support more easily so your icons work for the most people possible. Read up on our accessibility best practices.
Async your icons
Want to speed up your page loads? So do we. Have your icons load in the background so your site loads faster.
Download & Customize Easy
Want to manage and host Font Awesome assets yourself? You can download, customize, and use the icons and default styling manually. Both CSS and CSS Preprocessor (Sass and Less) formats are included.
Using CSS
- Copy the entire font-awesome directory into your project.
- In the of your html, reference the location to your font-awesome.min.css.
rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
Using Sass or Less
Use this method to customize Font Awesome 4.7.0 using Less or Sass.
- Copy the font-awesome/ directory into your project.
- Open your project’s font-awesome/less/variables.less or font-awesome/scss/_variables.scss and edit the @fa-font-path or $fa-font-path variable to point to your font directory.
Advanced & Packages Pro
Less Ruby Gem
Use the Official Font Awesome Less Ruby Gem to easily get Font Awesome Less into a Rails project. Generously maintained by @supercodepoet.
- Add this line to your application’s Gemfile:
$ gem install font-awesome-less
If you use Rails, add this to your e.g. application.less :
@import "font-awesome-sprockets"; @import "font-awesome";
Sass Ruby Gem
Use the Official Font Awesome Sass Ruby Gem to easily get Font Awesome Sass into a Rails or Compass project. Generously maintained by @supercodepoet.
- Add this line to your application’s Gemfile:
$ gem install font-awesome-sass
If you use Rails, add this to your e.g. application.scss :
@import "font-awesome-sprockets"; @import "font-awesome";
More Information
Validators
In order to provide the best possible experience to old and buggy browsers, Font Awesome uses CSS browser hacks in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren’t yet fully standardized, but these are used purely for progressive enhancement.
These validation warnings don’t matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don’t interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings.
Internet Explorer 8 and @font-face
IE8 has some issues with @font-face when combined with :before . Font Awesome uses that combination. If a page is cached, and loaded without the mouse over the window (i.e. hit the refresh button or load something in an iframe) then the page gets rendered before the font loads. Hovering over the page (body) will show some of the icons and hovering over the remaining icons will show those as well. See issue #954 for details.
Need IE7 Support?
If you need IE7 support, you have my condolences. Really. Font Awesome 4.7.0 doesn’t support IE7, but an older version does. You’ll need to check out the 3.2.1 instructions for using IE7. Then go complain to whoever decided your project needs IE7 support.
Troubleshooting
If you’re having trouble with Font Awesome, make sure to check out the troubleshooting wiki page. Generously maintained by @gtagliala.