Zed-King Institute

    HTML Ordered List with Type Attribute (I, A, a, i)

    easyListsHTML

    An ordered list numbers its items automatically; the type attribute changes the numbering style.

    The question

    Make an ordered list of these subjects in this order: Excel, IT Tools, Networking. The list must be numbered with type="a".

    The code

    index.html

    <ol type="a">
      <li>Excel</li>
      <li>IT Tools</li>
      <li>Networking</li>
    </ol>

    Result

    How it works

    1. 1<ol> starts an ordered list and every item goes in <li>.
    2. 2type="I" gives I, II, III; type="A" gives A, B, C; lower-case a and i give a, b, c and i, ii, iii.
    3. 3start="5" would begin the numbering at 5.

    Common mistakes

    • Putting type on the <li> instead of the <ol>.
    • Typing the numbers yourself inside each item — the list numbers itself.

    Now solve a similar question yourself

    A new HTML / CSS / JS question every time, checked instantly.

    Practice questions

    More in Lists