4. Lists

HTML affords you three list types: definition list (dl), ordered list (ol), and unordered list (ul). I explain each in depth in their respective entries in this chapter.

Lists are one of the most commonly used semantic elements across the Web. This is particularly true of unordered lists, which are ubiquitous as the choice for marking up navigation and many other groups of links.

Before I explain each list-related element, I’ll discuss a capability that is common to all lists: nesting.

Nested Lists

Lists can be nested within other lists, as shown in the following example that details a sequenced plan to relocate. In this case, it’s an ordered list inside another one, though you can nest any type of list within any other type (see the ...

Get The HTML Pocket Guide 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.