X
HOME HTML5 CSS3 JAVASCRIPT SQL PHP5 JQUERY ANGULAR BOOTSTRAP3 XML MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook