An ordered list includes items which are numbered. The list itself is contained within <ol> and </ol> tags, and each item in the list is contained within <li> and </li> tags. The following code:
<ol> <li>This is item 1.</li> <li>This is item 2.</li> </ol>
would produce the following output:
Your list doesn't have to use regular numbers - it could also use uppercase or lowercase letters, or uppercase or lowercase roman numerals. It also doesn't have to start at 1 (or a/A/i/I).
You can change the default values (numbers starting at 1) using the start and type attributes, but these aren't valid in strict HTML. A better way to do this is with CSS, which we'll cover in a later section.
<-- Previous Page Lists |
Next Page --> Unordered Lists |