HTML Tags

HTML <em> Tag

The <em> tag in HTML is used to indicate emphasized text.
Browsers typically render <em> text in italic style, but unlike <i>, it carries semantic importance.
Screen readers give it special emphasis, making it important for accessibility.
It is an inline element.

Syntax

html

<em>Emphasized text here</em>

Attributes

AttributeDescription
classAssigns one or more class names for styling.
idAssigns a unique identifier to the element.
styleAdds inline CSS styles to customize appearance.
titleProvides additional information as a tooltip.

Example

html

<!DOCTYPE html>
<html>
<head>
  <title>EM Tag Example</title>
  <style>
    .emphasis {
      color: #d35400;
      font-style: italic;
      background-color: #fff8e1;
      padding: 2px 4px;
      border-radius: 4px;
    }
  </style>
</head>
<body>
  <h1>HTML <em> Tag Example</h1>
  <p>
    This sentence contains <em class="emphasis" id="important-text" title="Emphasized Text">emphasized text</em> that conveys importance.
  </p>
  <p>
    Example: You should <em>read the instructions carefully</em> before starting the task.
  </p>
</body>
</html>

Output

Browser Output

html

Use our TryIt Editor to see the output.

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesYes

The <em> tag visually italicizes text and semantically emphasizes it, providing meaning for accessibility and screen readers.

Notes

  • <em> is an inline element used for semantic emphasis.
  • Screen readers pronounce emphasized text with more stress, improving accessibility.
  • CSS can further style <em> text with color, font size, or background.
  • For purely stylistic italics without semantic meaning, use <i>.

Conclusion

The <em> tag is essential for emphasizing text semantically in HTML.
It conveys importance for both human readers and assistive technologies while also rendering in italic style.