1

I am not being able to show font-awesome icons on my html, that are the sources that i am using, and below is the image of the error

And it is showing me this square:

enter image description here

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

<i class="fa fa-exclamation-triangle"></i>

<script src="js/jquery-3.5.1.min.js"></script>
Turnip
  • 35,836
  • 15
  • 89
  • 111
Lucca
  • 55
  • 6
  • 1
    Works absolutely fine for me here, https://jsfiddle.net/onkzqr23/ Have you checked what your browser console might have to say already? – CBroe Dec 10 '20 at 14:16
  • If you are not paying for the library, you probably have to define `font-weight: 900` – bpardo Dec 10 '20 at 14:18
  • try this one [Font Awesome not working, icons showing as squares](https://stackoverflow.com/questions/14366158/font-awesome-not-working-icons-showing-as-squares) – MD.SHARIAR KABIR Dec 10 '20 at 14:19
  • Just as @MD.SHARIARKABIR says you have to make sure the path to the font files are correct. The easiest way to make this work is to just download the Font Awesome package and place in the same folder as your project. Try that instead of using a cdn. – Kamelkent Dec 10 '20 at 14:24
  • It seems to work just fine. – YT_Xaos Dec 10 '20 at 14:28
  • Does this answer your question? [Font Awesome not working, icons showing as squares](https://stackoverflow.com/questions/14366158/font-awesome-not-working-icons-showing-as-squares) – BSMP Dec 10 '20 at 22:47

2 Answers2

-1

<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous" />

<i class="fas fa-exclamation-triangle"></i>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>

Try using this CDN link:

<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>

with this icon tag: <i class="fas fa-exclamation-triangle"></i>

Katy H.
  • 224
  • 1
  • 10
-1

you must use version 5 and use type fas font-awesome

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" />