Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Font Awesome icons with class "fa-brands" don't work

I have imported a font awesome library in the header as

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

and I have in the body

<i class="fa-brands fa-medium"></i>

which does not render (is blank). I am trying to get the icon from this library,
but if I omit brands I get a different medium icon.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You are loading a very old version of Font Awesome (4.7.0) but the documentation you link to is for the current version (6.3.0).

See Upgrade from version 4 which says:

  <!-- Version 4's syntax -->
  <i class="fa fa-camera-retro"></i> 

  <!-- Version 6's syntax -->
  <i class="fa-solid fa-camera-retro"></i>

fa-brands is the icon style syntax that was introduced after the version of Font Awesome you are using was released.

Upgrade to the current version.

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

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading