HTML | DOM Ol start Property
The DOM Ol start property is used to set or return the value of the start attribute in an ordered list. The start attribute in HTML is used to specify the start value for numbering the individual list item. It is used with an ordered list.
Syntax:
- It is used to return the start property.
olObject.start
- It is used to Set the start property.
olObject.start = number
- number: It defines a start value which represent the start value of the first list item in the ordered list.
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
- CSS | grid-row-start Property
- CSS | grid-column-start Property
- HTML | <ol> start Attribute
- HTML | start Attribute
- HTML | Marquee start method
- HTML | DOM id Property
- HTML | DOM li value Property
- HTML | DOM Bdo dir Property
- HTML | DOM value Property
- HTML | DOM specified Property
- HTML | DOM name Property
- HTML | DOM URL Property
- HTML | DOM dir Property
- HTML | DOM Map name Property
- HTML | DOM Image name Property
Property Values
Return Value: It returns a string value which represent the first value of the first list item in the ordered list.
Example-1: HTML Program that illustrate how to return the property.
<!DOCTYPE html> <html> <head> <title>DOM ol start Property</title></title> </head> <body> <h1 style="color:green;"> GeeksForGeeks </h1> <h2 style = "color: green;"> DOM ol start Property </h2> <p>Sorting Algorithms</p> <ol start="7" id="GFG"> <li>Bubble sort</li> <li>Merge sort</li> <li>Quick sort</li> </ol> <button onclick="myGeeks()">Submit</button> <p id="sudo" style="font-size:25px;color:green;"> </p> <!-- Script to get the value of start property --> <script> function myGeeks() { var x = document.getElementById("GFG").start; document.getElementById("sudo").innerHTML = x; } </script> </body> </html> |
Output :
Before clicking on the button:

After clicking on the button :

Example-2 : HTML Program that illustrate how to set the Property.
<!DOCTYPE html> <html> <head> <title>DOM ol start Property</title></title> </head> <body> <h1 style="color:green;"> GeeksForGeeks </h1> <h2 style = "color: green;"> DOM ol start Property </h2> <p>Sorting Algorithms</p> <ol start="2" id="GFG"> <li>Bubble sort</li> <li>Merge sort</li> <li>Quick sort</li> </ol> <button onclick="myGeeks()">Submit</button> <!-- Script to set the value of start property --> <script> function myGeeks() { document.getElementById("GFG").start = "7"; } </script> </body> </html> |
Output:
Before clicking on the button:

After clicking on the button:

Supported Browsers: The browser supported by DOM ol start Property are listed below:
Recommended Posts:
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



