HTML <ol> Ordered List Tag Reference
The ol HTML tag means "Ordered List", and is used for any lists of elements whose sequential order is significant.
The ol HTML tag means "Ordered List", and is used for any lists of elements whose sequential order is significant.
The Ordered List <ol> tag creates a list that may contain a number of list items / elements (<li></li>).
In normal text in a visual browser, an ordered list will render as a stacked list, similar to an unordered list, but with numbered or lettered items instead of simple bullets.
Use ordered lists wherever you have a sequence of related items that deserves to be described as a list, and whose order is significant.
When is order significant? One example is my top ten list below. Another may be when you say, “There are 3 good reasons for using semantic HTML..” and then go on to state those reasons in a list. The ordering there helps the reader keep track of where they are in the list. There are lots more applications in legal, scientific, and other formal types of content.
Do not use an when the order of elements is not important. Use an unordered list (<ul> ) instead.
The tag is valid in all current versions of HTML and xHTML, and it should always have a closing </ol> tag.
An ordered list may contain only list item (<li></li>) tags, but these may contain other content and HTML elements.
Here’s a simple example. The style=”list-style:roman;” tells the list to display with regular decimal numbers. Here’s a full list of other list-style options.
Looks like…
You may also consider using:
Do you love our approach to crafting simple & effective web sites that just work for people?
We'd love to hear about your web strategy.
Contact one of our team today!
<li>Google</li>
<li>UseIt.com</li>
<li>digg.com</li>
<li>del.icio.us</li>
<li>Save the Pixel</li>
<li>Basecamp</li>
<li>Slashdot</li>
<li>Smashing Magazine</li>
</ol>