Ol reversed Property
Example
Set the list order to descending:
document.getElementById("myOl").reversed = true;
Try it Yourself »
Definition and Usage
The reversed property sets or returns whether the list order should be descending or not.
When set to true, the list order will be descending (9, 8, 7...), instead of ascending (1, 2 , 3...).
Browser Support
Property | |||||
---|---|---|---|---|---|
reversed | Yes | Not supported | Yes | 6.0 | Yes |
Syntax
Return the reversed property:
olObject.reversed
Set the reversed property:
olObject.reversed = true|false
Property Values
Value | Description |
---|---|
true|false |
Specifies whether the list order should be descending or not
|
Technical Details
Return Value: | A Boolean, returns true if the list order is descending, otherwise it returns false |
---|
More Examples
Example
Find out if the list order is descending or not:
var x = document.getElementById("myOl").reversed;
Try it Yourself »
Related Pages
HTML reference: HTML <ol> reversed attribute
❮ Ol Object