HTML <option> label attribute
HTML <option> tag
Example
Use of the label attribute in option elements:
<select>
<option label="Volvo">Volvo (Latin for "I roll")</option>
<option label="Saab">Saab (Swedish Aeroplane AB)</option>
</select>
|
Try it yourself!
|
Definition and Usage
The label attribute specifies a shorter version of an option.
The shorter version will be displayed in the drop-down list.
Browser Support
The label attribute is only supported by IE 7+.
Syntax
Attribute Values
Value |
Description |
text |
A shorter version for an option |
HTML <option> tag
…
|