Latest web development tutorials

HTML option label attribute

Tag Reference HTML option HTML <option> tag

Examples

Using the label attribute in <option> element:

<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"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

In addition to Firefox, other major browsers support the label property.

Note: 7 and earlier versions of Internet Explorer does not support the label property <option> tag.


Definition and Usage

label attribute specifies a shorter version of the option.

Drop-down list will show a shorter version of the regulations.


Differences between HTML 4.01 and HTML5

no.


grammar

<option label="text">

Property Value

描述
text 选项的更短的版本。


Tag Reference HTML option HTML <option> tag