HTML <em> Tag

The <em> tag defines text that has stress emphasis. Browsers display the text within the tag in italic.

The <em> tag is an element of logical markup in contrast to the <i> tag, which has the same visual effect (italic), but at the same time, doesn’t carry a semantic load.

The <em> tag is not deprecated, but it is possible to achieve richer effects with CSS font-style property.

Syntax

The <em> tag comes in pairs, so the content is written between the opening (<em>) and the closing (</em>) tags.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <p>It is a normal paragraph</p>
    <p>The important part of the text is highlighted by the <em> in italic</em>.</p>
  </body>
</html>

Result

Attributes

The <em> tag supports the Global Attributes and the Event Attributes.

Browser support