THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML <option> label Attribute

HTML option Tag Reference 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>
  <option label="Mercedes">Mercedes (Mercedes-Benz)</option>
  <option label="Audi">Audi (Auto Union Deutschland Ingolstadt)</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 numbers in the table specify the first browser version that fully supports the attribute.

Attribute
label Yes 8.0 Yes Yes Yes

Differences Between HTML 4.01 and HTML5

NONE.


Syntax

<option label="text">

Attribute Values

Value Description
text A shorter version for the option

HTML option Tag Reference HTML <option> tag