6

I have to use font awesome in my Web, and I found that I have 2 ways to implements Font Awesome.

I want to work with 5.0.1 version, I realized that using ALL.CSS allows me to use Font-awesome in classes with: AFTER in CSS, but beyond that I do not know what the difference is, and what each one is used for, and another question, when I should use both.

<link href="https://use.fontawesome.com/releases/v5.0.1/css/all.css" rel="stylesheet">

<script defer src="https://use.fontawesome.com/releases/v5.0.1/js/all.js"></script>

I hope to use the lightest font-awesome to implement

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
juanjinario
  • 596
  • 1
  • 9
  • 24

2 Answers2

2

all.css is the font version of FontAwesome.

When you need the SVG font, you have to use js.css version.

More detail can be found on their website

S-Flavius
  • 292
  • 2
  • 14
Sumit Patel
  • 4,530
  • 1
  • 10
  • 28
2

Choose the javaScript (.js) OR the css (.css) version, not both.

.js : Retrieves the <i> tags with class name fa and replaces them with the code from an svg image. This is a good option if you don't have a lot of Font Awesome icons on your web page.

.css : Loads the Font Awesome font family (for example v5.0.1 = 37.78 kB). This is a good option when you have a large number of icons on your web page.