optgroup ... ⁄optgroup syntax
Syntax optgroup
- start tag required: <optgroup>
- end tag optional IF...: <⁄optgroup>
<⁄optgroup> optional IF...:
- optgroup element is immediately followed by another optgroup element (see the first <optgroup> element) Syntax 1 OR
- there is no more content after optgroup element inside the parent element, select (see the second <optgroup> element) Syntax 1
Examples optgroup syntax
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <!doctype html> <> <> <>...</> </> <> <> <>... <>... </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <!doctype html> <> <> <>...</> </> <> <> <>...</> <>...</> </> </> </> |
Video demonstration optgroup element, syntax
HTML5 optgroup element, syntax Tutorial
min | video details |
---|---|
00:05 | video tutorial: optgroup element, syntax |
00:10 | adding the optgroup element in page |
00:18 | the optgroup element has: - a start tag: <optgroup> - and an end tag: <⁄optgroup> |
00:23 | end tag <⁄optgroup> may be omitted if the optgroup element is immediately followed by another optgroup element |
00:32 | end tag <⁄optgroup> may be omitted if there's no more content after the optgroup element inside the parent element, which is the select element |