HTML Questions & Answers Logo
HTML Questions & Answers Part of the Q&A Network
Q&A Logo

How can I make a list that automatically numbers its items?

Asked on Oct 24, 2025

Answer

To create a list that automatically numbers its items, you should use the <ol> tag, which stands for "ordered list." This tag, combined with <li> tags for each list item, will automatically number the items for you.
<!-- BEGIN COPY / PASTE -->
    <ol>
      <li>First item</li>
      <li>Second item</li>
      <li>Third item</li>
    </ol>
    <!-- END COPY / PASTE -->
Additional Comment:
  • The <ol> tag is used to create an ordered list, which automatically numbers each <li> item.
  • You can customize the numbering style using the type attribute, such as <ol type="A"> for uppercase letters.
  • Lists can be nested by placing another <ol> or <ul> inside an <li> element.

✅ Answered with HTML best practices.


← Back to All Questions
The Q&A Network