<i>

Term side of the Card.
Topic: Formatting
Unit title: <i>
Categories: Tag
Explanation side of the Card

Explanation: The element that typically renders text in italics. It's often used to indicate a change in tone or to represent a different voice, such as a term in another language, a title or a technical term.

Browser compatibility:
  • The chrome browser supports this feature starting from version 1.
  • The edge browser supports this feature starting from version 12.
  • The firefox browser supports this feature starting from version 1.
  • The safari browser supports this feature starting from version 4.
Availability: 

Example

Wronghtml
<p>
  The phrase <i>déjà vu</i> comes from French.
</p>
Righthtml
<p>
  The phrase <i lang="fr">déjà vu</i> comes from French.
</p>

The lang attribute lets screen readers pronounce the French phrase correctly.

Common mistakes

  • Using <i> for icon fonts, which leaves an empty element with no meaning.
  • Using <i> for stressed words that need <em>.

Key points

  • <i> is used for an alternate voice, like terms, foreign words or ship names, not for emphasis.
  • Foreign phrases inside <i> have a lang attribute.
  • Icons use a <span> or <svg>, not an empty <i> element.

Interview questions

Is it okay to use i for icons?

It works but has no meaning. Use a <span> or <svg> with aria-hidden='true' for decorative icons.

How do I make text italic without adding meaning?

Use CSS font-style: italic on any element.

Analytics cookiesWe'd like to use analytics cookies to see which pages are useful. They're set only if you accept. Privacy Policy