How to use Font Awesome CDN

Font awesome Icons CDN list

In this tutorial we will learn how to use font awesome icons by serving them from font awesome cdn.

Using CDN(Content delivery Network) is the best way to serve font awesome icon css or js files, instead of hosting them from our own servers.

Steps to use font awesome CDN

  1. Open official font awesome icon website.

  2. Get a unique embed code by entering your email in following this link.

  3. Then font awesome sends an email with the Font Awesome CDN embed code along with instructions to add icons in our website.

  4. The sample JavaScript font awesome CDN link will be in below format.

  5. Copy the embed code you received via email and place it in your HTML <head> tag.

font awesome cdn embed code

font awesome cdn embed code

font awesome cdn register

font awesome cdn register

Here is the sample webpage which uses font awesome CDN.

<!doctype html>
    <!-- font awesome CDN Url -->
    <script src=""></script> 
    <!-- TODO: Place your own Font Awesome CDN embed code received via email  -->
    <i class="fa fa-home"></i>

Further we can register in font awesome CDN website to manage our preferences.

Advantages of using font awesome CDN

  1. A faster server from where we can serve font awesome icons.
  2. font awesome CDN servers always up and running.
  3. And the files will be served from nearest CDN server.
  4. We can quickly upgrade to font awesome pro icons without any code changes from our side.
  5. We can create multiple embed codes for different websites.
  6. Font Awesome CDN can load your icons asynchronously further boosting up the Site Performance.

One more big advantage of using font awesome CDN is we can automate our icon’s accessibility.

Font Awesome CDN’s auto accessibility feature helps the people with sight and hearing impairments.

For example consider the below example

<button type="submit">
  <i class="fa fa-envelope"></i> Email Us!

In the above example, inside submit button we are using font awesome icon. But for the visually challenged person who uses screen readers to access the website it’s not required to expose this icons.

So font awesome CDN will automatically adds the aria-hidden=true attribute to the icon.

<button type="submit">
  <i class="fa fa-envelope" aria-hidden=”true”></i> Email Us!

font awesome 5 CDN.

Apart from the above font awesome official CDN, we can use free version of font awesome icons by using content delivery networks like cdnjs, maxcdn and jsdelivr.

Font awesome CDN by cdn js

For the latest font awesome 5 version and above use the below font awesome CDN CSS file links by cdnjs.

If you want to use Javascript version of font awesome icons use the below CDN links by cdnjs.

For the latest fontawesome CDN versions refer below cdnjs link by cloudflare.

Serve font awesome icons CSS files using below jsdelivr CDN links.

For Font awesome CDN javascript files links use below.

Here is the link to latest jsdelivr fontawesome CDN.

For the earlier version like font awesome 4.7 we can use bootstap cdn links


Arunkumar Gudelli

Liked this post? Subscribe