Skip to main content

Ordered Lists.

Ordered lists are used when the order of items is important. Each item in an ordered list is represented by the <li> "list item" tag. The ordered list itself is wrapped within the <ol> tags. By default, ordered lists are displayed with numbers or letters as markers. Here's an example of an ordered list:

<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
GeekyWeb
  1. First item
  2. Second item
  3. Third item

You can also customize the type of markers in an ordered list by using the type attribute within the <ol> tag. For example, using the attribute type="A" will display capital letters [A, B, C] as markers:

<ol type="A">
<li>Item A</li>
<li>Item B</li>
<li>Item C</li>
</ol>
GeekyWeb
  1. Item A
  2. Item B
  3. Item C