ol start attribute
The start attribute on the ol element:
- allows you to set the items starting value (number), in an ordered list
- start is a specific attribute → can be applied ONLY on the next HTML5 element: ol
Examples
<ol | attribute | = | "value(s)" | > | ... | <⁄ol> | example |
---|---|---|---|---|---|---|---|
2. | start | = | integer | <start="2"> ... <⁄ > |
Video demonstration ol start attribute
HTML5 ol start attribute Tutorial
min | video details |
---|---|
00:07 | video tutorial: start attribute applied on ol element objective: understanding start attribute and its values |
00:16 | in the next ordered list, players rank is: player A: 1 player B: 2 player C: 3 player D: 4 |
00:25 | let's remove player A from the list: player A: rank 1 |
00:35 | now player B has the rank 1 and this is not correct since this rank belongs to players A thing achievable through the start attribute |
00:41 | in order to fix this we need to make the list to start with number 2 |
01:05 | the list is now correct: rank 2 corresponds to player B |
01:09 | in the same way, if we remove player B from the list, we need to change the value of the start attribute (from 2 to 3) to reflect the reality |