Easy Tutorial
❮ Prop Style Top Prop Style Flex ❯

HTML DOM Ol Object


Ol Object

The Ol object represents an HTML <ol> element.

Accessing an Ol Object

You can use getElementById() to access an <ol> element:

Creating an Ol Object

You can use the document.createElement() method to create an <ol> element:

Ol Object Properties

Property Description
compact Not supported in HTML5. Use style.lineHeight instead. <br>Sets or returns whether the list should be rendered with a more compact effect than normal.
reversed Sets or returns whether the list is in descending order.
start Sets or returns the value of the start attribute of an ordered list.
type Sets or returns the value of the type attribute of an ordered list.

Standard Attributes and Events

The Ol object also supports standard attributes and events.


Related Articles

HTML Reference: HTML <ol> Tag

❮ Prop Style Top Prop Style Flex ❯