<em>

Term side of the Card.
Topic: Semantics
Unit title: <em>
Categories: Tag
Explanation side of the Card

Explanation: The element that emphasizes text by typically rendering it in italics. It indicates that the text has greater importance or should be stressed and can affect how screen readers interpret the content.

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>
  I <i>did</i> lock the door.
</p>
Righthtml
<p>
  I <em>did</em> lock the door.
</p>

<em> marks stress that changes the meaning of the sentence; <i> is for alternate voice like terms or names.

Common mistakes

  • Using <em> for book titles or foreign words, which belong in <cite> or <i>.
  • Using <i> for icon fonts and confusing it with emphasis.

Interview questions

Is <em> always italic?

By default browsers show it in italics, but CSS can style it any way.

When should I use <em> instead of <strong>?

Use <em> for stress that changes meaning and <strong> for importance, seriousness or urgency.

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