element is used to emphasize text content, and displays in italics in all
current browsers. It provides semantic meaning about the text it contains,
effectively saying, “this text is slightly more important than other text
here.” This differentiates
em from the
i element, which merely sets the font to italics. In most
em is the preferred element to use.
The example code above would render as shown in Figure 1.
emin the browser
em element shouldn’t be used simply to
italicize text; the fact that emphasized text is rendered in italics is
coincidental. If you have a burning desire to make text italic, but not
for the purposes of emphasis, use CSS instead.
This example shows the
em element in action:
<p>Do you <em>really</em> need to buy those expensive jeans? I mean, is it really <em>that</em> important to you to look like some kind of circus freak?</p>
Use This For …
This element is used to mark up text content of any kind that needs moderate emphasis.
As one of the
earliest formatting elements,
em has full browser
There are no comments yet.