question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using <i> vs <span> for icons.

See original GitHub issue

Using <i> for icon is a not good, fcc shouldn’t teach/encourage bad practice, use <span>.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (13 by maintainers)

github_iconTop GitHub Comments

6reactions
AkiraLainecommented, Jun 30, 2016

@darrenbkl I don’t think anyone uses the span tag to display icons. In fact, contrary to what you say, every major icon provider (Font Awesome, Google Icons…etc) uses the i tag for it.

To empathize(italicize) text, you should use the em tag.

2reactions
ghostcommented, Jun 30, 2016

I agree with @AkiraLaine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should I use the span tag or the i tag for an icon? [duplicate]
<i> isn't the icon tag, it's the italic tag, and it doesn't make much difference which you pick. <span> is more semantically correct, ......
Read more >
Is it incorrect to use <I> tags for icons?
span and i tag are used to for defining an icon as it does not need to be a block element. So I...
Read more >
Should I use i tag for icons instead of span
The I element represents a span of text in a different voice or mood, or otherwise offset from the normal prose, such as...
Read more >
Icons Tutorial
The <i> and <span> elements are widely used to add icons. All the icons in the icon libraries below, are scalable vector icons...
Read more >
ARIA24: Semantically identifying a font icon with role="img"
The objective of this technique is to show how to semantically identify an element that uses a font file for icons. When a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found