div nested within elements, elements nested within div
Classified as: flow content, palpable content
Parents, div
Children, div
Examples: div parents, div children
1 2 3 4 5 6 7 8 9 10 11 12 13 | <!doctype html> <> <> <>...</> </> <> <> ... </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <!doctype html> <> <> <>...</> </> <> <> <>...</> <> ... </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <!doctype html> <> <> <>...</> <>...</> </> <> <> <>...</> </> </> </> |
Syntax 1: Valid, div nested within body: allowed
Syntax 2: Valid, p, img elements nested within div: allowed
Syntax 3: Invalid, div nested within head, h1: not allowed