Ordered list

In HTML an ordered list  ..  is a HTML element for a list of items where each item is automatically prefixed by an indication of its position in the list.

An unordered list  ..  is an HTML element for a list of items where each item is prefixed by a fixed symbol, or nothing.

A list-style-type implies the prefixes to be equal or changing, and overrides the distinction between ol and ul.

Examples: decimal (default list-style-type for ol):  Amsterdam Rotterdam The Hague 

gives

 Amsterdam Rotterdam</li> The Hague</li> </ol>

List style types
Specifying a list-style-type:

lower-alpha: <ol style="list-style-type: lower-alpha"> Amsterdam</li> Rotterdam</li> The Hague</li> </ol>

gives

<ol style="list-style-type: lower-alpha"> Amsterdam</li> Rotterdam</li> The Hague</li> </ol>

Similarly:

upper-alpha: <ol style="list-style-type: upper-alpha"> Amsterdam</li> Rotterdam</li> The Hague</li> </ol> lower-roman: <ol style="list-style-type: lower-roman"> Amsterdam</li> Rotterdam</li> The Hague</li> </ol> upper-roman: <ol style="list-style-type: upper-roman"> Amsterdam</li> Rotterdam</li> The Hague</li> </ol> disc (default list-style-type for 1st-level ul): <ol style="list-style-type: disc"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol> circle (default list-style-type for 2nd-level ul): <ol style="list-style-type: circle"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol> square (default list-style-type for 3rd and higher level ul): <ol style="list-style-type: square"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol> "none": <ol style="list-style-type: none"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol>

Starting value
A starting value (in decimal form) can be specified (naturally this has no effect if the prefix does not depend on the item's position in the list):

<li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol>

gives

<li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol>

Similarly for the different style types and a starting value of 2:

list-style-type: lower-alpha

<ol start=2 style="list-style-type: lower-alpha"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol>

list-style-type: upper-alpha

<ol start="2" style="list-style-type: upper-alpha"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol>

List-style-type: lower-roman

<ol start="2" style="list-style-type: lower-roman"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol>

List-style-type: upper-roman

<ol start="2" style="list-style-type: upper-roman"> <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol>

Comparison with a table
Apart from providing automatic numbering, the numbered list also aligns the contents of the items, comparable with using table syntax: <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol> gives <li>Amsterdam</li> <li>Rotterdam</li> <li>The Hague</li> </ol>

gives

This non-automatic numbering has the advantage that if a text refers to the numbers, insertion or deletion of an item does not disturb the correspondence.