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

4910 questions
319
votes
12 answers

Use Font Awesome Icons in CSS

I have some CSS that looks like this: #content h2 { background: url(../images/tContent.jpg) no-repeat 0 6px; } I would like to replace the image with an icon from Font Awesome. I do not see anyway to use the icon in CSS as a background image.…
L84
  • 42,350
  • 55
  • 167
  • 243
304
votes
9 answers

Use Font Awesome icon as CSS content

I want to use a Font Awesome icon as CSS content, i.e., a:before { content: "..."; } I know I cannot use HTML code in content, so is it only images left?
sdvnksv
  • 7,974
  • 10
  • 41
  • 85
294
votes
29 answers

How to add font-awesome to Angular 2 + CLI project

I'm using Angular 2+ and Angular CLI. How do I add font-awesome to my project?
Nik
  • 6,378
  • 5
  • 32
  • 46
252
votes
14 answers

How to center text vertically with a large font-awesome icon?

Lets say I have a bootstrap button with a font-awesome icon and some text:
hello world
How do I make text appear vertically centered? Text is aligned with the bottom edge of the icon…
Paul
  • 10,984
  • 5
  • 24
  • 28
241
votes
43 answers

Font Awesome not working, icons showing as squares

So I'm trying to prototype a marketing page and I'm using Bootstrap and the new Font Awesome file. The problem is that when I try to use an icon, all that gets rendered on the page is a big square. Here's how I include the files in the…
Connor Black
  • 6,177
  • 12
  • 35
  • 67
219
votes
7 answers

Font-awesome, input type 'submit'

There seems to be no class for input type 'submit' in font-awesome. Is it possible to use some class from font-awesome for button input? I've added icons to all buttons (which actually links with class 'btn' from twitter-bootstrap) in my…
denis.peplin
  • 8,722
  • 3
  • 42
  • 51
197
votes
10 answers

How to add a spinner icon to button when it's in the Loading state?

Twitter Bootstrap's buttons have a nice Loading... state available. The thing is that it just shows a message like Loading... passed through the data-loading-text attribute like this:
167
votes
7 answers

Custom li list-style with font-awesome icon

I am wondering if it's possible to utilize font-awesome (or any other iconic font) classes to create a custom
  • list-style-type? I am currently using jQuery to do this, ie: $("li.myClass").prepend("
    Darrrrrren
    • 5,308
    • 5
    • 28
    • 49
  • 153
    votes
    15 answers

    How to use icons and symbols from "Font Awesome" on Native Android Application

    I'm trying to use Font Awesome on my application, I was able to integrate the font using Typeface.createFromAsset(), but I also want to use the icons provided by this font, but so far I haven't been able to do that. This particular font contains…
    Julian Suarez
    • 4,359
    • 4
    • 21
    • 38
    148
    votes
    7 answers

    Add custom icons to font awesome

    I love the Font Awesome icon font and want to use it for most of the icons on my site but there are a few custom svg icons that I'd need in addition to what's offered. I noticed that the .svg version of Font Awesome is composed mostly of these…
    Christian Schlensker
    • 18,454
    • 17
    • 67
    • 115
    147
    votes
    14 answers

    Make Font Awesome icons in a circle?

    I am using font awesome on some project but I have some things that I want to do with font awesome icons, I can easily call an icon like this: Is it possible to all icon always be in round circle with border? Something…
    Schneider
    • 2,238
    • 6
    • 25
    • 36
    146
    votes
    24 answers

    Font Awesome icon inside text input element

    I am trying to insert a user icon inside username input field. I've tried one of the solution from the similar question knowing that background-image property won't work since Font Awesome is a font. The following is my approach and I can't get…
    Seong Lee
    • 9,484
    • 21
    • 64
    • 99
    144
    votes
    25 answers

    FontAwesome icons are not showing, Why?

    Recently I've been developing a website and I'm trying to use some font-awesome icons. The problem is, they are not showing up. Here is the HTML: Get a FREE Quote or
  • Luis Valdez
    • 1,845
    • 3
    • 12
    • 21
  • 136
    votes
    7 answers

    Using Font Awesome icon for bullet points, with a single list item element

    We'd like to be able to use a Font Awesome ( http://fortawesome.github.com/Font-Awesome/ ) icon as a bullet point for unordered lists in a CMS. The text editor on the CMS only outputs raw HTML so additional elements/ classes cannot be added. This…
    BaronGrivet
    • 4,043
    • 5
    • 32
    • 49
    1
    2 3
    99 100