2.7 Text-Level Semantics—More New Tags 33
2.7.5 Elements with Marginal Changes
The list of elements with marginal changes starts with b and i, two tags that no
longer fit into the concept of HTML5, also because of their names: b for bold
and i for italic give definite formatting instructions, and these are not popular
in HTML5. The relevance is now essential, so we should instead use strong and
em as in emphasis to stress the importance of a word. Unfortunately, b and i are
among the most widely used tags, which is why it was impossible to prevent their
use altogether. The solution was a compromise that continues to allow both but
alters their meaning: b now refers to offset text in bold and i to offset text in ital-
ics. But if you want to write clean HTML5, you should avoid using b and i in the
future and instead use strong and em.
Other small changes mean that cite now designates the title of a work and must
explicitly not be used for citing names. small now means not only small print,
but also represents side comments or small print in the sense of legal notices but
without making statements as to their importance. hr now signals a thematic
break, not just a horizontal line to break up the layout.
The specification offers a usage summary of individual tags with examples at the
end of the chapter Text-level semantics. To save you from having to look it up,
here it is in our Table 2.2.
Table 2.2 Usage of Semantic Text Elements
Element Purpose Example
a Hyperlinks Visit my <a href="drinks.html">drinks</a>
page.
em Stress emphasis I must say I <em>adore</em> lemonade.
strong Importance This tea is <strong>very hot</strong>.
small Side comments These grapes are made into wine.
<small>Alcohol is addictive.</small>
s Inaccurate text Price: <s>£4.50</s> £2.00!
cite Titles of works The case <cite>Hugo v. Danielle</cite> is
relevant here.
q Quotations The judge said <q>You can drink water from
the fish tank</q> but advised against it.
dfn Defining
instance
The term <dfn>organic food</dfn> refers to
food produced without synthetic chemicals.
abbr Abbreviations Organic food in Ireland is certified by the <abbr
title="Irish Organic Farmers and Growers
Association">IOFGA</abbr>.