Problem Statement
What does the start attribute do in an ordered list?
Explanation
The start attribute specifies which number to begin counting from in an ordered list. By default, ordered lists start counting from 1. The start attribute allows you to begin from any number you choose. For example, start equals 5 will begin numbering at 5, 6, 7, and so on. This is useful when you need to continue a list from a previous section or when creating multi-part numbered lists. The start attribute works with all type values. If you are using letters with type equals A and start equals 3, the list will begin with C. If you are using Roman numerals with type equals I and start equals 4, the list will begin with IV. The start attribute only accepts positive integers. You can also use the value attribute on individual li tags to set a specific number for that item, which will affect the numbering of subsequent items.
Code Solution
SolutionRead Only
<!-- Start from number 5 --> <ol start="5"> <li>Item five</li> <li>Item six</li> <li>Item seven</li> </ol> <!-- Displays: 5. 6. 7. --> <!-- Start with letter C --> <ol type="A" start="3"> <li>Third option</li> <li>Fourth option</li> </ol> <!-- Displays: C. D. --> <!-- Continue a list --> <ol> <li>First step</li> <li>Second step</li> </ol> <p>Some text in between</p> <ol start="3"> <li>Third step</li> <li>Fourth step</li> </ol>
