Why is using <span> with the Awesome font more semantically correct than <i>?

I have been using Font Awesome for a while, and I am wondering which tag should I use for it.

It is said here that they like the tag <i>for brevity, but use is <span>more semantically correct.

I read the spec for <i>and <span>. Unfortunately, I cannot find the difference, they both have the same context in which they can be used.

+4
source share
2 answers

<span> <i> , <i> , <span> , CSS, , <span> css, .

, <span> .

<i> , , <i>, .

+7

, <i> html, <span> . , span i . <span> html, , img, :

<span class="your_awesome_font_icon" role="img"></span>
+4

Source: https://habr.com/ru/post/1609563/


All Articles