HTML DOM Ol reversed Property
HTML DOM Ol reversed Property
-- Learning is not just about technology, but also about dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
JavaScript Reference
JavaScript Objects
JavaScript Array Object JavaScript Boolean Object JavaScript Date Object JavaScript Math Object JavaScript Number Object JavaScript String Object JavaScript RegExp Object JavaScript Global Properties/Functions JavaScript Operators JavaScript Error
Browser Objects
Window Object Navigator Object Screen Object History Object Location Object Storage Object
DOM Objects
HTML DOM Document Object HTML DOM Element Object HTML DOM Attribute Object HTML DOM Event Object HTML DOM Console Object CSSStyleDeclaration Object DOM HTMLCollection
HTML Objects
<a> <area> <audio> <base> <blockquote> <body> <button> <canvas> <col> <colgroup> <datalist> <del> <details> <dialog> <embed> <fieldset> <form> <iframe> <frameset > <img> <ins> <input> - button <input> - checkbox <input> - color <input> - date <input> - datetime <input> - datetime-local <input> - email <input> - file <input> - hidden <input> - image <input> - month <input> - number <input> - range <input> - password <input> - radio <input> - reset <input> - search <input> - submit <input> - text <input> - time <input> - url <input> - week <keygen> <link> <label> <legend> <li> <map> <menu> <menuItem> <meta> <meter> <object> <ol> <optgroup> <option> <param> <progress> <q> <script> <select> <source> <style> <table> <td> <th> <tr> <textarea> <title> <time> <track> <video>
Ol reversed Property
Example
Set the list to descending order:
document.getElementById("myOl").reversed=true;
Definition and Usage
The reversed property sets or returns whether a list is in descending order.
When set to true, the list is in descending order (9, 8, 7...), instead of ascending order (1, 2, 3...).
Browser Support
All major browsers support the reversed property, except Internet Explorer.
Note: Safari 5 and earlier versions do not support the reversed property.
Syntax
Get the reversed property:
olObject.reversed
Set the reversed property:
olObject.reversed=true|false
Property Values
| Value | Description |
|---|---|
| true|false | Specifies whether the list is in descending order.
|
Technical Details
| Return Value: | A boolean value. Returns true if the list is in descending order, otherwise false. |
|---|
More Examples
Example
Check if the list is in descending order:
var x = document.getElementById("myOl").reversed;
The output of x will be:
false
Related Articles
HTML Reference: HTML <ol> reversed Attribute
YouTip