optgroup ... ⁄optgroup, display in browser
Browser display, optgroup element
- empty optgroup element (start tag, end tag only): does not display in browser
- the value of the label attribute of an optgroup element: displays in browser in bold and Italic: label_optgroup
- its children, option elements + content: displays in browser inside the drop down list indented under the corresponding group
Video demonstration optgroup element, view in browser
HTML5 optgroup, browser display, Tutorial
min | video details |
---|---|
00:02 | video tutorial: testing the browser display of the optgroup element |
00:10 | empty optgroup element (start tag, end tag only) does not display in browser |
00:17 | non-empty optgroup element (option elements inside each group) does not display in browser, but indent the options |
00:37 | the name of a group given by the value of the label attribute (which is a required attribute) displays in browser, inside the drop-down list in bold and Italic |
00:51 | removing 1 group to highlight the impact in browser of the presence ⁄absence of the optgroup element on option elements |
00:56 | grouped options |
00:59 | ungrouped options |