Skip to content


Examples should use a generic HTML element instead of the i element. #2451

gnotaras opened this Issue · 9 comments

6 participants


First of all, thanks for this project! Very useful and adds quality to web pages.

However, the use of the <i> element in the examples instead of a more generic one like <span>, which BTW can be nested, is at least surprising!

AFAIK, even in HTML 5, the <i> element is meant to be used with text. This is a bad choice and I hope you change it soon, before it becomes a habit to Font-Awesome users!


Fort Awesome member

@gnotaras thanks but it's a little bit too late because <i> tags were here since bootstrap 2: and that's why fontawesome is still using <i> in examples.

Since this is not breaking backward compatibility, I think we can move all examples from <i> to <span>, like bootstrap 3.0 does.

I need to ask Dave about this


@tagliala Geremia, thank you for your reply. I hope such a change makes its way to the official documentation.

PS: BTW, huge respect for replying so fast and for keeping these bug reports so well organized. Fantastic job!

Fort Awesome member

@gnotaras you're welcome

Dave answered, we could consider and discuss this for 4.1.0

I'm in for this change, let's encourage best practices like we did for selectors.

Probably I will keep using i for my projects because it's shorter and reminds me about icons but in that case it will be my fault, not fontawesome's documentation one


With Bootstrap 3 their official documentation has changed to use the more semantic <span> element in it's glyphicons examples


I think that users should be given the option of choosing the i or/and span elements to use based on their preference without forcing users to use either i or span elements.


I agreed with @respectyoda - option of using either <i>/<span>... I can use <i> for my personal projects and <span> for education? Keep up the good work!

Fort Awesome member

The element you use is entirely up to you. How about we compromise and add a note about using span elements and how they're more semantically correct?


@davegandy That sounds like a good compromise.

Fort Awesome member

Added a note to the basic example about using span elements. Closing this issue.

@davegandy davegandy closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.