HTML Attributes
HTML label attribute
Supplies a human-readable label for optgroup, option or track. It is not the same as the label element used to name form controls. Applicable elements include: <optgroup>, <option>, <track>. Check each element’s value rules.
Formal Syntax & Structure
html syntaxhtml
label="Tea"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| label | text | Supplies a human-readable label for optgroup, option or track. It is not the same as the label element used to name form controls. |
Working Example
Example Snippethtml
<select aria-label="Drink"> <optgroup label="Tea"> <option>Green</option> </optgroup></select>