Ol start attribute

Definition and usage

start Set or return 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-referencehandbok:HTML <ol> etikett

Example

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 attribute:

olObject.start

Ställ in start-attribut:

olObject.start = number

Attributvärde

Värde Beskrivning
number Bestämmer startvärdet för det första elementet i en numrerad lista.

Tekniska detaljer

Returvärde: Nummer, som representerar startvärdet för den första listelementet i en numrerad lista.

Browserversioner

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Stöd Stöd Stöd Stöd Stöd

Relaterade sidor

HTML-referencehandbok:HTML <ol> start-attribut