Quentin's answer clearly states that i
tag should not be used to define icons.
But, Holly suggested that span
has no meaning in itself and voted in favor of i
instead of span
tag.
Few suggested to use img
as it's semantic and contains alt
tag. But, we should not also use img
because even empty src
sends a request to server. Read here
I think, the correct way would be,
<span class="icon-fb" role="img" aria-label="facebook"></span>
This solves the issue of no alt
tag in span
and makes it accessible to vision-impaired users. It's semantic and not misusing ( hacking ) any tag.