totn HTML

HTML: <em> tag

This HTML tutorial explains how to use the HTML element called the <em> tag with syntax and examples.

Description

The HTML <em> tag marks text that has stress emphasis which traditionally means that the text is displayed in italics by the browser. This tag is also commonly referred to as the <em> element.

Syntax

In HTML, the syntax for the <em> tag is:

<body>
<p><em>Stress emphasized text goes here</em> but not here</p>
</body>

Sample Output


Attributes

Only the Global Attributes apply to the <em> tag. There are no attributes that are specific to the <em> tag.

Note

  • The HTML <em> element is found within the <body> tag.
  • The <em> tag is used to separate the text from the rest of the content. Browsers traditionally italicize the text found within the <em> tag. You can change this behavior with CSS.

Browser Compatibility

The <em> tag has basic support with the following browsers:

  • Chrome
  • Android
  • Firefox (Gecko)
  • Firefox Mobile (Gecko)
  • Internet Explorer (IE)
  • Edge Mobile
  • Opera
  • Opera Mobile
  • Safari (WebKit)
  • Safari Mobile

Example

We will discuss the <em> tag below, exploring examples of how to use the <em> tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.