Questions tagged [font-awesome]

Font Awesome is an iconic standalone vector font, initially developed for use with the Twitter Bootstrap front-end framework.

Font Awesome is an iconic font purely built using scalable vector graphics, so it provides clear, smooth and scalable icons for use in different browsers and on different devices.

Font Awesome is currently on version 5.15.

You can check the new icons added here

Previous Versions:

  • v4.x.x
  • v3.x.x (These docs are for v3.2.1, which is no longer officially supported)

Version 4.1 was the first Font Awesome version that drops support of IE7 entirely, so you should not upgrade to it or any later version if your application must support IE7 browser.

Current version provides 7,865 font-icons

You can subset font-awesome using either icnfnt or fontello to create specific icon sets rather than downloading the entire family of icons.

It is free for commercial use and licensed under the SIL Open Font License 1.1.

CDN

Font awesome is available as a hosted file on content delivery networks, eg BootstrapCDN and Cloudflare CDN.

Stack Overflow Snippet Quick Start v5.15.2

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

Syntax, v5.x.x (documentation):

fa[x] fa-[name]

Where:

  • [x] is a prefix used for style group types (ex: fab- where b stands for brand)
  • [name] is the name of the icon (icon list).

For example:

<i class="fas fa-camera"></i> <!-- this icon's 1) style prefix == fas and 2) icon name == camera -->
<i class="fas fa-camera"></i> <!-- using an <i> element to reference the icon -->
<span class="fas fa-camera"></span> <!-- using a <span> element to reference the icon -->

Stack Overflow Snippet Quick Start v4.7.0

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

Syntax, v4.x.x (documentation):

fa fa-[name]-[shape]-[o]-[direction]

Where:

  • [name] is the name of the icon (icon list).
  • [shape] is the optional shape of the icon's background: either circle or square.
  • [o] is the optional outlined version of the icon.
  • [direction] is the direction in which certain icons point (arrows, etc.).

For example:

<i class="fa fa-cogs"></i>
<i class="fa fa-bookmark-o"></i>
<i class="fa fa-facebook-square"></i>
<i class="fa fa-arrow-left"></i>

As Font Awesome icons are font-based we can then apply our own styling on top:

i.fa {
    color: purple;
    font-size: 64px;
    padding: 5px 10px;
}

CSS-applied Example

5577 questions
88
votes
4 answers

Vertical alignment of text and icon in button

I'm having trouble vertically aligning a font-awesome icon with text within a button under the Bootstrap framework. I've tried so many things including setting the line-height, but nothing is working.
88
votes
10 answers

How to know if a font (@font-face) has already been loaded?

I'm using Font-Awesome, but while the font files are not loaded, the icons appear with . So, I want these icons to have display:none while files are not loaded. @font-face { font-family: "FontAwesome"; src:…
Shankar Cabus
  • 9,302
  • 7
  • 33
  • 43
84
votes
10 answers

Font-Awesome error 404 on fonts

I do not know what is going on but in the browser console I can see 3 errors related to font-awesome GET http://www.desktop.just4bettors.mobi/fonts/fontawesome-webfont.woff2?v=4.3.0 GET…
Non
  • 8,409
  • 20
  • 71
  • 123
83
votes
3 answers

Font Awesome vs Glyphicons in Twitter Bootstrap

I am a beginner in web development and I recently started working with Twitter Bootstrap, I know it uses Glyphicons which I already know how to use. But I also came across Font Awesome which says that it is built for Bootstrap. What are the…
user2471133
  • 1,377
  • 3
  • 14
  • 15
80
votes
8 answers

Use FontAwesome or Glyphicons with css :before

Is there any way to embed HTML in the css content: element when using a :before pseudo-element? I want to use a Font Awesome (or Glyphicon) in a use case like this: h1:before { content: "X"; padding-right: 10px; …
tig
  • 3,424
  • 3
  • 32
  • 65
79
votes
7 answers

How to add badge on top of Font Awesome symbol?

I would like to add badge with some number (5, 10, 100) on top of the Font Awesome symbol (fa-envelope). For example: But, I can not understand how to put the badge on top of the symbol. My attempt is available here: jsFiddle. I would like to…
LA_
  • 19,823
  • 58
  • 172
  • 308
76
votes
3 answers

How do I include a font awesome icon in my svg?

I have an svg that includes images: How do I replace that line w/ a font awesome icon:
user_78361084
  • 3,538
  • 22
  • 85
  • 147
75
votes
5 answers

How to install only required fonts from Font Awesome?

I would to use a couple of icons from Font Awesome. I see that we can download the entire font-awesome directory and use simple code like and use fa-camera-retro to display the icons. Is it possible for me to…
Shashi Deshetti
  • 1,354
  • 2
  • 11
  • 22
74
votes
7 answers

Cound not find icon react-fontawesome

I have a project on React and I need to integrate FontAwesome to it. I found official library and installed it as instructed in readme $ npm i --save @fortawesome/fontawesome $ npm i --save @fortawesome/react-fontawesome When I try to use it in my…
iamawebgeek
  • 2,713
  • 1
  • 18
  • 34
74
votes
16 answers

Font Awesome & Unicode

I'm using (the excellent) Font-Awesome in my site, and it's working fine, if I use it this way: But (for some reasons) I want to use it in the Unicode way, like: (Font Awesome's cheatsheet) But it doesn't…
matan129
  • 1,508
  • 2
  • 20
  • 33
73
votes
9 answers

How to center Font Awesome icons horizontally?

I have a table with a Font Awesome icon and I want to align text left and center icons. I tried with centering but doesn't work: HTML: CSS: td, th { text-align: left; } td i { …
Mustapha Aoussar
  • 5,833
  • 15
  • 62
  • 107
72
votes
1 answer

Keep Text From Wrapping in Bootstrap 3 Responsive Design

I have a viewer with a control bar consisting of divs in a row. The other items have the FA icon already over the text for it so there is no issue with screen size but in order to differentiate two of the buttons that have higher level control to…
68
votes
5 answers

Can I use font-awesome icons on emails

I'm developing a Rails app and we need to send emails. I have installed font-awesome icons through a rails gem (https://github.com/bokmann/font-awesome-rails) (i use .scss) It works fine on my webpage views but not on emails. At least gmail doesn't…
Mathieu
  • 4,587
  • 11
  • 57
  • 112
67
votes
7 answers

Is it possible to make Font Awesome icons larger than 'fa-5x'?

I am using this HTML code:
user3973427
  • 1,435
  • 3
  • 16
  • 20
66
votes
8 answers

Add tooltip to font awesome icon

Has anyone here added tooltips to font-awesome icons? I have the following jsfiddle, but cannot seem to find a guide to add tooltips to the icons.
Harriet
  • 1,633
  • 5
  • 22
  • 36