akhilpoojari
New member
The "start" attribute is commonly used in HTML elements to specify the starting value of numbered lists. It allows you to define a number other than 1 as the initial value for the list items. This attribute is particularly useful when you want to create lists that continue from a previous list or start from a specific number other than 1.
Here's an explanation of how to use the "start" attribute with examples:
Syntax:
<ol start="value">
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<!-- More list items if needed -->
</ol>
Example 1: Starting a numbered list from a value other than 1
<ol start="5">
<li>Item 5</li>
<li>Item 6</li>
<li>Item 7</li>
</ol>
Output:
5. Item 5
6. Item 6
7. Item 7
Example 2: Continuing a numbered list from a previous list
<ol start="10">
<li>Item 10</li>
<li>Item 11</li>
<li>Item 12</li>
</ol>
Output:
10. Item 10
11. Item 11
12. Item 12
Example 3: Nesting lists with the "start" attribute
<ol start="3">
<li>Item 3</li>
<li>Item 4</li>
<ol start="1">
<li>Subitem 1</li>
<li>Subitem 2</li>
</ol>
</ol>
Output:
3. Item 3
4. Item 4
1. Subitem 1
2. Subitem 2
Notes:
- The "start" attribute is supported in all modern web browsers.
- It's important to note that while the "start" attribute is commonly used with `<ol>` (ordered lists), it's not supported in `<ul>` (unordered lists) as unordered lists do not have a numerical sequence.
Here's an explanation of how to use the "start" attribute with examples:
Syntax:
<ol start="value">
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<!-- More list items if needed -->
</ol>
Example 1: Starting a numbered list from a value other than 1
<ol start="5">
<li>Item 5</li>
<li>Item 6</li>
<li>Item 7</li>
</ol>
Output:
5. Item 5
6. Item 6
7. Item 7
Example 2: Continuing a numbered list from a previous list
<ol start="10">
<li>Item 10</li>
<li>Item 11</li>
<li>Item 12</li>
</ol>
Output:
10. Item 10
11. Item 11
12. Item 12
Example 3: Nesting lists with the "start" attribute
<ol start="3">
<li>Item 3</li>
<li>Item 4</li>
<ol start="1">
<li>Subitem 1</li>
<li>Subitem 2</li>
</ol>
</ol>
Output:
3. Item 3
4. Item 4
1. Subitem 1
2. Subitem 2
Notes:
- The "start" attribute is supported in all modern web browsers.
- It's important to note that while the "start" attribute is commonly used with `<ol>` (ordered lists), it's not supported in `<ul>` (unordered lists) as unordered lists do not have a numerical sequence.
Last edited by a moderator: