214 CHAPTER 5 More HTML5
Using the <strong> element
Closely related to the <b> element is the <strong> element, which represents strong impor-
tance for its contents. You can show relative importance by nesting <strong> elements within
<strong> elements. Note that changing the importance of part of the text in a sentence does
not change the meaning of the sentence. The following is an example that is in response to
the question, “Should I take a left turn?”
<p>
You need to turn <strong>right</strong>.
</p>
Note that the default styles for <strong> and <b> elements look the same.
Using the <i> element
The <i> element was used to produce italic text, but like the <b> element, the element
should provide meaning, not style.
According to the W3C, the <i> element represents a span of text that is in an alternate
voice or mood or is otherwise offset from the normal prose in a manner indicating a different
quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from
another language, a thought, or a ship name in Western texts.
This means that that you can apply any style to the <i> element, although, like the <b>
element, you probably should keep the default style.
The <em> element
Use the <em> element for emphatic stress. Use it to designate text you’d pronounce some-
what differently, with emphasis. The following is an example that is in response to the ques-
tion, “Can you find a developer?”
<p>
I <em>am</em> a developer.
</p>
Note that the default styles for <em> and <i> elements look the same.
Using the <abbr> element for abbreviations and acronyms
In earlier versions of HTML, you could indicate an acronym by using the <acronym> element,
but in HTML5, the <acronym> element is obsolete. Use the <abbr> element to indicate an
abbreviation or acronym and use the title attribute to provide the full text.
The <abbr> element is an inline element and can be used with <strong> or other inline
elements as necessary. The following is an example of denoting an abbreviation and acronym
by using the <abbr> element.
<p>
The <abbr title='radio detection and ranging'>radar</abbr>
must be repaired <abbr title='as soon as possible'>ASAP</abbr>