How to fix Font Awesome icons showing as squares with HTML?

Spread the love

Sometimes, we want to fix Font Awesome icons showing as squares with HTML.

In this article, we’ll look at how to fix Font Awesome icons showing as squares with HTML.

How to fix Font Awesome icons showing as squares with HTML?

To fix Font Awesome icons showing as squares with HTML, we should add all the classes needed to show the icon.

For instance, we write

<i class="fas fa-search"></i>

to show the search icon for Font Awesome 5.x

If we use version before 5.x, we write

<i class="fa fa-search"></i>

to do the same thing.

Conclusion

To fix Font Awesome icons showing as squares with HTML, we should add all the classes needed to show the icon.

Leave a Reply

Your email address will not be published. Required fields are marked *