Menu

Ordered Lists

Ordered Lists

Use an ordered list when the sequence of items matters, like steps in a recipe or a ranking. It automatically numbers each item.

The outer tag is <ol>, and each item goes inside an <li> tag, short for list item.

<ol>

  <li>Preheat the oven</li>

  <li>Mix the ingredients</li>

  <li>Bake for 20 minutes</li>

</ol>

Explanation: The browser automatically numbers these as 1, 2, 3 based on their order in the code. If you rearrange the li tags, the numbers update automatically without you typing them yourself.


HTML Tutorial (From Basics to Implementation)

AP

Abhishek Pati





Get in Touch For Details