How do we create numbered list items?

Question

How do we create numbered list items?

Answer

We can create numbered list items, instead of bulleted list items, by using the <ol>, ordered list, element instead of the <ul>, unordered list, element.

Example using <ol>:

  1. I'm
  2. an
  3. ordered (numbered)
  4. list!

Example using <ul>:

  • I'm
  • an
  • unordered (bulleted)
  • list!
2 Likes

Thx a lot 2 u! This topic is really useful

2 Likes

If you wish to start the list with a desired number (let us say 16), you can use Start Attribute like this:

(Example of a list starting from number 16)

  1. I am
  2. a
  3. fan

Here is the code:

<ol start="16">
 <li>I am</li>
 <li>a</li>
 <li>fan</li>
</ol>
1 Like