Latest

recent

HTML Option label attribute

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>


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

<option label="value">

Attribute Values

Value Description
text A shorter version for an option
HTML Option label attribute Reviewed by 1000sourcecodes on 21:43 Rating: 5
Powered by Blogger.