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.
|Attrs||Other Attributes||Common, Event, I18n||STF|
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>