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 organized information, and XHTML has some wonderful tools to manage this task. XHTML has three 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. 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.

An unordered list of Web browsers.

Figure 4.1. An unordered list of Web browsers.

This 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 ...

Get HTML, XHTML, & CSS All-in-One For Dummies®, 2nd Edition 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.