HTML and CSS Reference
In-Depth Information
but it should stand out so as to grab attention. The City Press web page includes the fol-
lowing:
<p><b class="lede">Meteorologists predict more sunshine and
scorching temperatures for the
upcoming week, prompting area farmers to install irrigation
systems.</b></p>
In this case, the purpose of the b element is specifically defined using a class at-
tribute.
Side comments: small
Like i and b , small was traditionally used as a presentational element. It made
text—you guessed it—smaller! This is a task that is much better suited to the CSS
font-size property. In HTML5, small gains real semantic meaning. It now means
the small print, fine print, side comments, all places that might hold legal disclaimers, li-
cense agreements, copyrights, and the like. It may also be used to indicate attribution of
a piece of work, such as text or images. The reporter names in the City Press are placed
in the small element. For example, at the end of the main photo's caption, the HTML
reads as follows:
<small>Chris Elhorn | The City Press</small>
Inaccurate text: s
Yet another element that has changed meaning in HTML5, the s element historically
meant strikethrough text and, being presentational in nature, was slated for the obsolete
bin. However, in HTML5, s has been redefined as text that is no longer accurate or rel-
evant. For example, the City Press web page shows temperatures in the weather sidebar.
The values have been recently updated, so the old values are labeled inaccurate using
the s element, while the new values are given importance using the strong element
(as shown earlier in the “Emphasis and importance” section):
<ul>
<li>High: <s>82°F</s> <strong>96°F</strong></li>
<li>Low: <s>70°F</s> <strong>79°F</strong></li>
</ul>
Note In some cases, it may be necessary to mark text as having been deleted, such as
when viewing page changes in a wiki (the more generic term for user-edited sites like
Search WWH ::




Custom Search