FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

Ol reversed Property

Ol Object Reference Ol Object

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
  • true - The list order is descending
  • false - Default. The list order is not descending (it is ascending)

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;

The result of x will be:

false
Try it Yourself »

Related Pages

HTML reference: HTML <ol> reversed attribute


Ol Object Reference Ol Object