How to customize the numbers in an ordered list with HTML?

Spread the love

Sometimes, we want to customize the numbers in an ordered list with HTML.

In this article, we’ll look at how to customize the numbers in an ordered list with HTML.

How to customize the numbers in an ordered list with HTML?

To customize the numbers in an ordered list with HTML, we set the value attribute.

For instance, we write

<ol>
  <li value="3">This is item three.</li>
  <li value="50">This is item fifty.</li>
  <li value="100">This is item one hundred.</li>
</ol>

to set the li’s value attribute to the number we want to display for each li.

Conclusion

To customize the numbers in an ordered list with HTML, we set the value attribute.

Leave a Reply

Your email address will not be published. Required fields are marked *