HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The Ol object represents an HTML <ol> element
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");
Create an Ol Object
You can create an <ol> element by using the document.createElement() method:
var x = document.createElement("OL");
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 |
The Ol object also supports the standard properties and events.
HTML reference: HTML <ol> tag