Search w3schools.com:

SHARE THIS PAGE

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 »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The label attribute is supported in all major browsers.

Note: The label attribute of the <option> tag is not supported in Internet Explorer 7 and earlier versions.


Definition and Usage

The label attribute specifies a shorter version of an option.

The shorter version will be displayed in the drop-down list.


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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]