Creating Ordered and Unordered Lists

The ordered list is perfect for providing step-by-step instructions on how to complete a particular task or for creating an outline (complete with links to corresponding sections, if desired) of a larger document. You may create an ordered list anywhere in the body section of your HTML document.

Unordered lists are probably the most widely used lists on the Web. Use them to list any series of items that have no particular order, such as interesting Web sites or names.

To create lists:

1.
Type <ol> for an ordered list or <ul> to begin an unordered list.
2.
Type <li> (that’s the first two letters of the word list) to begin the first list item.
3.
Type the text to be included in the list item.
4.
Type </li> ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart 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.