You are here: Reference > JavaScript > client-side > HTML DOM > properties > start (ol)

start property (ol)

Browser support:
Specifies or returns the starting number for an ordered list.
This property is deprecated in the HTML 4.01 specification, but Internet Explorer earlier than version 8 doesn't support any other way to achieve this functionality. In other browsers and in Internet Explorer from version 8 you can use the counterIncrement style property instead.

Syntax:

object.start;
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: start

Possible values:

Negative or positive Integer that sets or retrieves the starting number.
Default: 1.

Example HTML code 1:

This example illustrates the use of the start attribute:
<ol start="30">
    <li>Apple</li>
    <li>Peach</li>
    <li>Pear</li>
</ol>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the start property:
<head>
    <script type="text/javascript">
        function ChangeStart () {
            var list = document.getElementById ("fruits");
            var input = document.getElementById ("myInput");

            list.start = input.value;
        }
    </script>
</head>
<body>
    <ol id="fruits" start="30">
        <li>Apple</li>
        <li>Peach</li>
        <li>Pear</li>
    </ol>

    <input id="myInput" type="text" value="5" />
    <button onclick="ChangeStart ();">Change the start number of the list!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content