EM
Used to indicate emphasis, the EM element is usually rendered
as italics, although final presentation is left to the
user agent.
While the use of EM to indicate emphasis is still
valid HTML, if your desire is to render italics, CSS might
better serve your purpose.
EM may be rendered as <EM>italics</EM>
or it might be rendered as <EM>colored text</EM>.
|
|
EM may be rendered as
italics
or it might be rendered as
colored text.
|
In addition to rendering italics, style sheets can be used
to add other attributes to different sections of text.
<STYLE type="text/css">
EM {font-style: italic;
color: red;
}
</STYLE>
<EM>italicized red text</EM>
Or:
<EM style="color: red">
|
italicized red text
|
<STYLE type="text/css">
#red {font-style: italic;
background: #ffcc99;
color: red;
}
#green {font-style: italic;
background: #ffcc99;
color: green;
}
</STYLE>
<EM id="red"> red</EM><BR>
<EM id="green">green</EM>
|
red
green
|
Note that the ID selectors (#red and #green) must start
with the hashmark. The hashmark lets the browser know
that an ID value is coming up next.
Additional Resources:
HTML 4.01 Tags
|