Ol start attribute

Definition and usage

start Sets or returns the value of the start attribute of the ordered list.

ol start attribute Specify the starting value of the first list item in the ordered list.

See also:

HTML reference manual:HTML <ol> tag

Instance

Example 1

Set the starting value of the ordered list to "100":

document.getElementById("myOl").start = "100";

Try it yourself

Example 2

Return the value of the first list item in the ordered list:

var x = document.getElementById("myOl").start;

Try it yourself

Example 3

When using Roman numerals (type="I"), set the starting value of the ordered list to "5":

document.getElementById("myOl").start = "5";

Try it yourself

Syntax

Return start property:

olObject.start

Indstil start egenskab:

olObject.start = number

Egenskabsværdi

Værdi Beskrivelse
number Angiver startværdien for det første element i en ordnet liste.

Tekniske detaljer

Returværdi: Et tal, der repræsenterer startværdien for den første listeelement i en ordnet liste.

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support

Relaterede sider

HTML reference manual:HTML <ol> start egenskab