What is the <option> tag attribute that is actually used?

According to the w3 XHTML specification, the attribute labelindicates a shorter label for this option. However (using the try-it tool with FF3.5), I see no effect. Hence my question: what does this attribute really do?

EDIT It seems to override the label used in the drop-down list. The contents of the option (as far as I know) is used only as the default value for value. Does this (in IE7 +) mean the following two declarations?

<option label="Volvo">Volvo (Latin for 'I roll')</option>

and

<option label="Volvo" value="Volvo (Latin for 'I roll')">Whatever....</option>
+3
source share
2 answers

label , .

label , , W3C. :

http://www.w3schools.com/tags/att_option_label.asp

W3C:

http://www.w3.org/TR/html4/interact/forms.html#edef-OPTION


(Edit):
@Martijn - , , , , " " , , . /, /, .

0

. IE 7+. IE, .

+4

Source: https://habr.com/ru/post/1730386/


All Articles