You are here: Reference > HTML > attributes > label (option)

label attribute (option)

Browser support:
Sets a short label for an option element.
This attribute works differently in different browsers, do not use it. Use the value attribute instead.
JavaScript page for this attribute: label. You can find other example(s) there.

Possible values:

String that sets the label of the option.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the label attribute:
<select id="mySelect" size="2">
    <option label="Apple">Malus domestica
    <option />Pear
</select>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content