Home > Chapter Review and Exercises > Chapter 5 - Text Markup
With the fundamentals of markup established, this chapter introduces all the HTML elements available for formatting various types of text content (both block and inline), with an emphasis on using markup in a meaningful and semantic way. The chapter closes with a section on how to “escape” special characters.
In Chapter 5, you will learn the following:
Elements for basic text components, such as paragraphs (p) and headings (h1–h6)
Elements for inserting breaks (hr, br, wbr)
Elements for marking up unordered (ul, li), ordered (ol, li), and description (dl, dt, dd) lists
Other content elements (blockquote, pre, figure, figcaption)
Elements used to organize a page (main, section, article, nav, aside, header, footer, address)
Inline (phrase) elements (abbr, b, cite, code, data, del, dfn, em, i, ins, kbd, mark, q, s, samp, small, strong, sub, sup, time, u, var)
How to properly nest elements
Generic elements (div for block elements; span for inline elements)
The id attribute for identifying unique elements
The class attribute for classifying elements as belonging to a group
How ARIA roles improve accessibility
How and why to escape special characters
document outline
The outline created by the heading order within a document.
thematic break
The point at which one topic has completed and another one is beginning. It can be indicated with the hr element (originally defined as a “horizontal rule”).
unordered list
A collection of items that appear in no particular order.
ordered list
A list in which the sequence of the items is important.
definition list
A list that contains name and value pairs, including but not limited to terms and definitions.
nesting
The containment of one element completely inside another element.
monospace font
A font in which all the characters have the same width.
text-level semantic elements
What the HTML5 spec calls elements that appear within the flow of text without introducing line breaks (previously called inline elements; also referred to as phrasing content).
structured data
Standards that allow content to be machine-readable, enabling it to be used by computer programs (like a calendar app) and search engines. Microformats, Microdata, RDFa, and JSON-LD are examples of structured data standards.
global attributes
Attributes that can be used with any HTML element (for example, id and class).
ARIA roles
The role attribute describes an element’s function or purpose in the context of the document to improve accessibility — for example, role="alert" or role="menubar".
escaped character
A character represented by its Unicode number or a predefined name. For example, the < character must be escaped (represented as < or < in the source so it is not mistaken for the beginning of a tag.
character entity reference
A name or a number assigned to a character that is referenced when that character is escaped.
named character entity
A predefined abbreviated name for the character— for example, — for an em dash (—).
numeric character entity
An assigned numeric value that corresponds to the character’s position in a coded character set such as Unicode.
5-1: Marking up a recipe
Students add markup for paragraphs, headings, lists, and a blockquote to a sample recipe. Tags can be written into the provided source document or written right on the page.
5-2: Identifying inline elements
In this exercise, inline elements are added to a selection of HTML source code. The challenge is to find examples of b, br, cite, dfn, em, i, q, small, and time in the text content.
5-3: Putting it all together
This exercise is an opportunity to try out elements from the entire chapter. The content is provided, and readers are walked through the markup step by step.