Emphasizing HTML

Use HTML to emphasize a word or phrase.
2 min read
Believemy logo

The <em> tag is used to emphasize a word or expression. It tells the browser (and assistive technologies) that a passage should be pronounced with emphasis or holds particular importance in the sentence.

Good to know

By default, emphasis is displayed in italics, but its role is primarily semantic.

 

Structure and syntax of the <em> tag

Basic structure and syntax

The <em> tag is a container tag (which works in pairs):

  • with an opening tag <em>;
  • as well as a closing tag </em>.

Example:

HTML
<em>[Text to emphasize]</em>

 

Usage example

In a sentence:

HTML
<p>It is <em>absolutely necessary</em> to back up your data.</p>

The segment "absolutely necessary" will be read with emphasis by a screen reader and displayed in italics.

Try it yourself:

 

Attributes

<em> accepts the standard attributes: class, id, style, title, lang, etc.

 

Difference with other similar tags

  • <i>: puts word(s) in italic form for a change of register (foreign term, work title), without semantic emphasis.
  • <strong>: emphasizes importance or urgency; often rendered in bold and taken into account by screen readers and search engines.
  • <b>: purely stylistic bold, without additional meaning.

 

Best practices

Use <em> to signify intonation, emphasis or logical contrast (Like "I really want to go!").

Limit usage to very short pieces in a sentence (too much emphasis dilutes the message).

Optionally combine with CSS rules (font-style, color) without removing the semantic value.

Good to know

For a crucial passage (alert, warning) prefer <strong>; for the italic effect, use <i> instead.

 

Browser compatibility

The <em> tag is supported by all modern browsers:

BrowserCompatibility
ChromeYes
FirefoxYes
SafariYes
EdgeYes
Internet ExplorerYes

Related terms

Discover our hTML and CSS glossary

Browse the terms and definitions most commonly used in HTML and CSS development.

Share this article

Want to help us? Share this article on your networks or even better: on your site, in an article or in your newsletter.