C H A P T E R  8

Marking Up Text

We are going to switch track from the big structural document elements to something much finer grained: the text-level elements (text elements, for brevity). When you add these elements to your text, you add structure and meaning. This will become evident as you work through the examples in this chapter.

The HTML5 specification makes it clear that you should only use elements for their semantic value. However, to make life easier, the specification also makes it clear that the traditional styling associated with these elements is part of the semantic meaning for some elements. This is a bit of a fudge, but a helpful one that maintains compatibility with older HTML versions.

Some of these elements have very specific ...

Get The Definitive Guide to HTML5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.