HTML DOM Ol Object
Ol Object
The Ol object represents an HTML
-
.
Accessing the Ol Object
You can use getElementById() to access it
-
element:
var x = document.getElementById("myOl");
Try it
Creating the Ol Object
You can use the document.createElement() method to create
-
element:
var x = document.createElement("OL");
Try it
Ol Object Properties
| property | Description |
|---|---|
| compact | Not supported in HTML5. Use style.lineHeight as a replacement. |
| Sets or returns whether the list is rendered in a more compact style than normal. | |
| reversed | Sets or returns whether the list is in descending order. |
| start | Sets or returns the value of the start attribute of the ordered list. |
| type | Sets or returns the value of the type attribute of the ordered list. |
Standard properties and events
The Ol object also supports the standard property and Events.
Related Articles
HTML Reference Manual:HTML
-
tag