HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET 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 »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The label attribute is supported in all major browsers, except Firefox.

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]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE