Ordered Lists

Element: <ol>
Start tag: required
End tag: required
Attributes: [none]

 

Element: <li>
Start tag: required
End tag: optional
Attributes: id, class, lang, dir, title, style,
  onclick, ondblclick, onmousedown,
  onmouseup, onmouseover, onmousemove,
  onmouseout, onkeypress, onkeydown,
  onkeyup, more attribute info here

Ordered list tags start with <ol>. Each list item is started with <li>. You do not need to close the <li> tag, but you will have to close the <ol> tag with </ol>. Make sure to place your List tags within the <body> and </body> tags.

<ol>
<li>Compaq</li>
<li>Dell</li>
<li>Gateway</li>
</ol>

  1. Compaq
  2. Dell
  3. Gateway

When you use the Ordered List tag it will display numbers. You can use CSS to change the style of the list. Possible types of lists are: decimal, decimal-leading-zero, lower-roman, upper-roman, georgian, armenian, lower-latin, upper-latin, lower-alpha, upper-alpha, or lower-greek.

Examples

<ol style="list-style-type: upper-roman">
<li>Compaq</li>
<li>Dell</li>
<li>Gateway</li>
</ol>

  1. Compaq
  2. Dell
  3. Gateway

<ol style="list-style-type: lower-roman">
<li>Compaq</li>
<li>Dell</li>
<li>Gateway</li>
</ol>

  1. Compaq
  2. Dell
  3. Gateway

<ol style="list-style-type: upper-latin">
<li>Compaq</li>
<li>Dell</li>
<li>Gateway</li>
</ol>

  1. Compaq
  2. Dell
  3. Gateway

<ol style="list-style-type: lower-latin">
<li>Compaq</li>
<li>Dell</li>
<li>Gateway</li>
</ol>

  1. Compaq
  2. Dell
  3. Gateway