Skip to content

07. i and em Tags

The <i> and <em> tags both create italic text, but serve different purposes. Understanding their semantic differences helps create accessible HTML that properly conveys meaning to users and assistive technologies.

The <i> tag is a presentational element that makes text italic without semantic meaning.

<p>This is <i>italic text</i> using the i tag.</p>

Use <i> for:

  • Technical terms
  • Foreign words
  • Thoughts or asides
  • Ship names
  • Titles of works
<p>The term <i>de facto</i> means "in fact".</p>
<p>The ship <i>Titanic</i> sank in 1912.</p>

The <em> tag indicates emphasized content and renders as italic.

<p>This is <em>emphasized text</em> using the em tag.</p>

Use <em> for:

  • Emphasizing words or phrases
  • Adding stress to content
  • Indicating importance through emphasis
<p>I <em>really</em> need to finish this project.</p>
  • <i>: No semantic meaning, purely presentational
  • <em>: Indicates emphasis, semantic meaning
  • <i>: Screen readers don’t emphasize it
  • <em>: Screen readers emphasize it with stress

Both render as italic, but serve different purposes.

<!-- Good: Semantic emphasis -->
<p>I <em>really</em> enjoyed the movie.</p>
<!-- Avoid: Using i for emphasis -->
<p>I <i>really</i> enjoyed the movie.</p>
<!-- Good: Styling without emphasis -->
<p>The word <i>café</i> comes from French.</p>