HTML <option> label Attribute

❮ HTML <option> tag

Example

Use of the label attribute in <option> elements:

<label for="cars">Choose a car:</label>

<select id="cars">
  <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 Not supported Yes Yes

Syntax

<option label="text">

Attribute Values

Value Description
text A shorter version for the option

❮ HTML <option> tag
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.