option ... ⁄option, display in browser
Browser display, option element
- empty option element (start tag, end tag only): does not display in browser but reserves the space for the option inside the drop-down list
- its content, type text: displays in browser inside the drop-down list
- grouped options are indented
- the value of value attribute of the option element inside datalist element: does not display in browser
- the value of value attribute of the option element inside datalist element linked to an input element: displays as suggestion to user input
Video demonstration option element, view in browser
HTML5 option, browser display, Tutorial
min | video details |
---|---|
00:04 | video tutorial: testing the browser display of the option element |
00:17 | empty option element reserves the space for the option inside the drop-down list, but does not display anything |
00:25 | the content, type text, of the option element displays in the drop-down list of options |
00:39 | grouped options display indented, under their corresponding group inside the drop-down list |
00:55 | option element, child of a datalist element does not display in browser |
01:03 | when datalist element is connected to an input control, the value of the value attribute of the option element may display as suggestion to a user input |