menuitem nested within elements
Classified as: -
Parents, menuitem
Children, menuitem
Examples: menuitem parents
1 2 3 4 5 6 7 8 9 | <!doctype html> <> <> <>...</> </> <> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <!doctype html> <> <> <>...</> </> <> < type="popup"> <> <> </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <!doctype html> <> <> <>...</> <> </> <> <> <><></> < type="toolbar"> <> </> <> <> </> </> </> |
Syntax 1: Valid, menuitem absent; optional element
Syntax 2: Valid, 1 or multiple menuitem element allowed ONLY inside a menu element whose type attribute is "popup"
Syntax 3: Invalid, menuitem nested within head, body, p, menu type="popup": not allowed
Video demonstration nesting menuitem
HTML5 nesting menuitem, Tutorial
min | video details |
---|---|
00:06 | video tutorial: menuitem element, syntax ⁄ place in page |
00:12 | syntax menuitem |
00:12 | adding menuitem element in page |
00:14 | menuitem element has: - only the start tag: <menuitem> - has no end tag; it's a void element |
00:18 | nesting menuitem |
00:18 | no element can be nested inside it; has no end tag → no 'inside' |
00:21 | can be nested only inside menu elements whose type attribute is in the popup state meaning type="popup" |