HTML and CSS Reference
Additional HTML Markup for Text
THROUGHOUT THIS TOPIC, you have learned about several HTML elements that can be used for layout and
content markup. In this appendix, I cover some additional HTML elements that can be used to mark up your text con-
The <strong> element is used to signify that a piece of text is important and should be noted. Browsers will usually
display the content as bold text; however, it is important to understand that by putting text within a <strong> ele-
ment you are also altering its semantic meaning. You should not use it purely for styling purposes. (In those cases, you
should use the <span> element and CSS, as discussed later in this appendix.)
<strong>Do not cross the bridge</strong>, as the support
structure has been weakened.
In the preceding example, I use the <strong> element to indicate that the instruction is more important than the ex-
The <em> element is used to place emphasis on a particular word or phrase. This element can be used to change the
meaning of a sentence and indicates that the content should be read with a different mood or voice. The following ex-
ample conveys the tone that someone is very passionate about HTML5.
This would appear in most browsers as “HTML5 rocks !”
Browsers will usually style text within the <em> element in italics, but again, it should not be used purely for styling
purposes. Using a <span> element with CSS would be more appropriate.
The <s> element is used to identify text that is no longer relevant, but which continues to be displayed. The following
line is an example of how the <s> element can be used to signal that the maintainer of a web page has been updated.
<p>This page is maintained by <s>Joe Balochio</s> Matt West.</p>
Browsers will often apply a strikethrough style to the contents of <s> elements. Figure A-1 shows how this example
would be displayed.