HTML <option> label attribute

Definition and Usage

label The attribute specifies the shorter version of the option.

This shorter version will be displayed in the dropdown list.

Example

Use the label attribute in the <option> element:

<label for="cars">Por favor, selecione uma marca de veículo:</label>
<select id="cars">
  <option label="奥迪">Audi (Auto Union Deutschland Ingolstadt)</option>
  <option label="比亚迪">BYD (Build Your Dreams)</option>
  <option label="奔驰">Mercedes (Mercedes-Benz)</option>
  <option label="沃尔沃">Volvo (Latin for "I roll")</option>
</select>

Experimente você mesmo

Sintaxe

<option label="text">

Valor do atributo

Valor Descrição
text Versão mais curta da opção.

Suporte do navegador

Os números na tabela indicam a versão do navegador que suporta completamente essa propriedade pela primeira vez.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Suporte 8.0 Não suportado Suporte Suporte