Ol startProperty

Ol 对象参考手册Ol Object

Example

Set the start value of an ordered list to "75":

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

Try it Yourself »

Definition and Usage

The start property sets or returns the value of the start attribute of an ordered list.

The start attribute specifies the start value of the first list item in an ordered list.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the start attribute.


Syntax

Return the start property:

olObject.start

Set the start property:

olObject.start=number

Property Values

Value Description
number Specifies the start value of the first list item in an ordered list.

Technical Details

Return Value: A number, representing the start value of the first list item in an ordered list.


More Examples

Example

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

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

xThe output is:

50

Try it Yourself »

Example

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

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

Try it Yourself »


Related Articles

HTML Reference:HTML <ol> start Attribute


Ol 对象参考手册Ol Object

Other Extensions