HTML and CSS Reference
In-Depth Information
element should be used to indicate emphasis , while the strong element should be used
to indicate importance. Nesting either of these elements conveys more and more em-
phasis and/or importance on the enclosed content, for example:
<strong>CAUTION</strong>
<strong><strong>WARNING</strong></strong>
<strong><strong><strong>DANGER</strong></strong></strong>
<p>I am <em>worried!</em></p>
<p>I am <em><em>very</em> worried!</em></p>
You may not want your emphasis displayed in such a way. Remember that you can
always restyle em and strong elements to display however you like, while still retain-
ing their meaning. For instance, if the text of your document was in Japanese ideograph-
ic text, then you would be unlikely to need an italic version for emphasis. A change in
background color would likely be more appropriate.
Note This preceding issue of internationalization is discussed in more detail in Molly
E. Holzschlag's article “World Grows Small: Open Standards for the Global Web”
( www.alistapart.com/articles/worldgrowssmall ) .
For the City Press web page, strong is used in the weather forecast to give the fore-
cast values importance over the surrounding labels (for example, “High” and “Low”):
<aside>
<h1>Weather</h1>
<p><strong>Sunny</strong></p>
<ul>
<li>High: <strong>82?F</strong></li>
<li>Low: <strong>70?F</strong></li>
</ul>
</aside>
From a semantic point of view, the actual weather content is what is most important
in this section, so the strong element is appropriately applied to the weather values
and not to the surrounding labels.
Note The stricken-out temperatures shown in the City Press screenshot in Figure 3-7
will be added later in the “Inaccurate text” section.
Search WWH ::




Custom Search