Chapter 4. Managing Information with Lists and Tables

In This Chapter

  • Understanding basic lists

  • Creating unordered, ordered, and nested lists

  • Building definition lists

  • Building basic tables

  • Using rowspan and colspan attributes

You'll often need to present large amounts of information organized in some way, and XHTML has some wonderful tools to manage this task. XHTML has three different kinds of lists and a powerful table structure for organizing the content of your page. Figure out how these tools work, and you can manage complex information with ease.

Making a List and Checking It Twice

XHTML supports three types of lists. Unordered lists generally contain bullet points. They're used when the order of elements in the list isn't important. Ordered lists usually have some kind of numeric counter preceding each list item, and definition lists contain terms and their definitions.

Creating an unordered list

All the list types in XHTML are closely related. The simplest and most common kind of list is an unordered list.

Looking at an unordered list

Look at the simple page shown in Figure 4-1. In addition to a couple of headers, it has a list of information.

The list of browsers has some interesting visual characteristics:

  • The items are indented. There's some extra space between the left margin and the beginning of each list item.

  • The list elements have bullets. That little dot in front of each item is a bullet. Bullets are commonly used in unordered lists like this one.

  • Each item begins a new line

Get HTML, XHTML, and CSS All-In-One Desk Reference For Dummies® 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.