optgroup label attribute
The label attribute on the optgroup element:
Examples
<optgroup | attribute | = | "value(s)" | > | ... | <⁄optgroup> | example |
---|---|---|---|---|---|---|---|
2. | label | = | string (optgroup_name) | <label="optgroup_name"> ...<⁄ > |
Video demonstration optgroup label attribute
HTML5 optgroup label attribute Tutorial
min | video details |
---|---|
00:00 | video tutorial: label attribute on optgroup element |
00:05 | the value of the label attribute on optgroup element gives the name of the group |
00:12 | label attribute on optgroup element is required |
00:15 | adding the label attribute on optgrop element and a value to it |
00:20 | 'East of Greenwich' represents the name of the first group |
00:24 | 'West of Greenwich' represents the name of the second group |
00:31 | the value of the 2 labels (group names) display inside the drop-down list |