By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

HTML Em Tag

Reference on the EM tag of HTML

Edited: 2015-12-03 13:13

The em element is used to markup emphasized text, or in other words, to stress emphasis.

Screen readers, and other assistive tools may indicate this emphasis in different ways to the user. Visual browsers typically renders the text in a italicized font.

Do not use this element for presentational purposes alone, as the em element is intended to carry semantic meaning.

Attributes

Standard Attributes

Attribute:Value:Description:DTD:
AttrsOther AttributesCommon, Event, I18nSTF

DTD. Defines which document type the attribute is allowed. S=Strict, T=Transitional, F=Frameset.

Examples of how to use the Em element

In this example we will try to markup a verbal discussion using HTML.

Imagine that Mathew has complimented the web-designer, but someone disagrees with his statement, and tells us that it's the boss who is doing most the work.

<p>Mathew thinks our web-designer id doing all the work, but I think the <em>boss</em> is doing most the work!</p>

How to markup the sentence really depends on the part you want to emphasize. If it's a recorded conversation, the pronunciation would decide.

In the next example, our employee wants to stress what he thinks, rather than who is doing all the work:

<p>Mathew thinks our web-designer id doing all the work, but <em>I</em> think the boss is doing most the work!</p>

It would also be valid to markup longer text passages:

<p>Mathew thinks our web-designer id doing  <em>all the work</em>, but I think the boss is doing most the work!</p>