figcaption nested within elements, elements nested within figcaption
Classified as: -
Parents, figcaption
Children, figcaption
Examples: figcaption parents, figcaption children
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <!doctype html> <> <> <>...</> </> <> <> <> ...</> ... </> <> ... <> ...</> </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <!doctype html> <> <> <>...</> </> <> <> <> <>...</> </> ... </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <!doctype html> <> <> <>...</> <>...</> </> <> <> <> ... </> </> <> ...</> </> </> |
Syntax 1: Valid, figcaption nested inside figure (as its first or last child): allowed
Syntax 2: Valid, a nested inside figcaption: allowed
Syntax 3: Invalid,
figcaption nested inside head: not allowed;
figcaption nested inside h1: not allowed
figcaption placed straight on body: not allowed
Video demonstration nesting figcaption element
HTML5 nesting figcaption element, Tutorial
min | video details |
---|---|
00:00 | video tutorial: figcaption nested inside elements, elements nested inside figcaption element |
00:05 | figcaption element: place in page ⁄ nesting |
00:10 | figcaption element can be added ⁄ nested only inside figure element |
00:15 | → figcaption straight on body for example or inside other HTML elements except figure, is NOT ALLOWED !! |
00:20 | figcaption element can be nested only inside figure element as its FIRST child OR |
00:27 | figcaption element can be nested only inside figure element as its LAST child |
00:33 | for the purpose of the example, we used the img element, but instead of it you can have other HTML element(s) classified as flow content click here to see the list of elements classified as flow content |
00:39 | inside figcaption element, you can have element(s) classified as flow content click here to see the list of elements classified as flow content |