X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM Ol Object


Ol Object

The Ol object represents an HTML <ol> element.

Access an Ol Object

You can access an <ol> element by using getElementById():

var x = document.getElementById("myOl"); Try it

Create an Ol Object

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

var x = document.createElement("OL"); Try it

Ol Object Properties

Property Description
compact Not supported in HTML5. Use style.lineHeight instead.
Sets or returns whether the list should render smaller than normal, or not
reversed Sets or returns whether the list order should be descending or not
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 Properties and Events

The Ol object also supports the standard properties and events.


Related Pages

HTML reference: HTML <ol> tag



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook