Ordered Lists: The reversed and start Attributes

Tomek Sułkowsi pointed out that ordered lists can be numbered backwards using nothing more than an HTML attribute, as shown in the demo embedded above.

<ol reversed>
  <li>Apple</li>
  <li>Banana</li>
  <li>Pear</li>
</ol>

Going the other direction, the start attribute sets the first number of a list to something other than one:

<ol start="2">
  <li>Apple</li>
  <li>Banana</li>
  <li>Pear</li>
</ol>

These attributes are easy to overlook. They also have a practical use: when a list is interrupted—by a code block, for example—start lets you resume the numbering where it stopped instead of beginning again at one.

CSS-Tricks Star Logo