<ol> list items </ol>is used to indicate a numbered list. In a numbered list each item is displayed preceded by the next number in sequence for the current list.
Here is an example of nested numbered lists.
There are three attributes associated with the <ol> tag.
The value of this attribute controls the style of item numbering. The following values are understood.
This value gives a list in which the items are labelled using lower case letters such as "a", "b", "c" etc. Here is an example.
If the attribute value "A" is given then the list items will be labelled using upper case letters.
This value gives a list in which the items are labelled using lower case Roman numerals such as "i", "ii", "iii" etc. Here is an example.
The value "I" will give upper case Roman numerals thus
This value gives a list in which the items are labelled using decimal numbers. This is the default.
The value of this attribute is used to control the "origin" of the numbering of list items. It should always be a decimal integer irrespective of the value of the type attribute.
Here is an example of list with the numbering starting at 7.
Changing the type to "a" gives the following list
If you examine the HTML you'll see that the value of the start attribute always has to be specified in decimal even for lists of one of the other styles, so, if you want to start a type=a list at e you'll have to remember that e is the fifth letter of the alphabet.
This little-known attribute is mentioned in the HTML 3.2 standard as indicating that the list should be rendered "in a more compact style". The standard gives no further clues. Here's a simple ordered list
Here's exactly the same list with the compact attribute
Browsers
MOS3 does not honour the type or start attributes and produces a much more modest amount of indentation than the other browsers.
There is an interesting difference between the rendering these lists between NN3 and IE3. The following extract from the list immediately above shows the difference, it's here rendered in pre-formatted text style so you can see exactly what happens.
9. Prince Edward Island 10. Québec
9. Prince Edward Island 10. Québec
There is no doubt that the NN3 style is more attractive. IE3's sudden intrusion of extra spaces between the numbers and the list element is visually disconcerting. IE4 resolves the problem adopting the layout style used by NN3.