Search code examples
htmlsemantic-markup

Which tag is semantically correct for ordered list with ex aequo positions - OL or UL?


If a list is definitely ordered (ranking with positions), but some position numbers are doubled (because of ex aequo result), should an unordered list tag (UL) be used then, or still ordered list (OL)?


Solution

  • If the order of a list matters, even if the order is non-standard, the list should be marked up with an Ordered List element (<ol>).

    As Kaiido points out, the default numbering of list items can be altered by using the value attribute.

    The case of ex aequo (i.e., evenly placed or "dead heat") results in a competition could be marked up like this:

    <ol>
      <li value="1">Penny Oleksiak</li>
      <li value="1">Simone Manuel</li>
      <li value="3">Sarah Sjöström</li>
    </ol>