CKTIS / HTML
reversed — descending list numbering
The boolean `reversed` attribute on `ol` enables descending numbering. It changes the numbering direction without reversing the order of the `li` elements.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<ol reversed>...</ol>reversed applies to ol. Numbering decreases by 1, while the order of li elements stays unchanged. Without this attribute, numbering ascends.
This is a boolean attribute: presence matters. Valid forms are reversed, reversed="", and reversed="reversed". Writing reversed="false" is nonconforming and still enables descending numbering. To disable it, remove the attribute.
Without a valid start, the starting value equals the number of li elements owned by the list. start sets another starting number; value on an li changes that item's number, after which numbering continues downward.
Examples
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Reversed list</title>
<ol reversed>
<li>Alpha</li>
<li>Beta</li>
<li>Gamma</li>
</ol>
</html>Result
3. Alpha 2. Beta 1. Gamma
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.