td nested within elements, elements nested within td
Classified as: sectioning root
Parents, td
Children, td
Examples: td parents, td children
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <!doctype html> <> <> <>...</> </> <> <> <>...</> <> <> <>...</> <>...</> </> <> <>...</> <>...</> </> </> </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | <!doctype html> <> <> <>...</> </> <> <> <>...</> <>...</> <> <><>...</></> <><></> </> <> <><>...</></> <><>...</></> </> </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <!doctype html> <> <> <>...</> <>... </> <> <>... <> <>... </> </> </> |
Syntax 1: Valid, td nested within tr: allowed
Syntax 2: Valid, flow elements (a, img, span, u....see the Children list above) nested within td: allowed
Syntax 3: Invalid, td nested within elements( head, body, p) other than tr: not allowed
Video demonstration nesting td
HTML5 nesting td Tutorial
min | video details |
---|---|
00:05 | td element nested inside elements; elements nested inside td |
00:10 | td element can be nested inside tr element ONLY! |
00:20 | inside a td element: you can add simply text, OR you can nest all HTML elements classified as flow content see above the list of elements that can be nested inside td element |
00:29 | text inside td |
00:33 | a nested inside td |
00:39 | hyperlinked text inside td |
00:43 | p nested inside td (a paragraph inside a data cell) |
00:50 | img nested inside td (an image inside a data cell) |
01:07 | other elements inside td (see above the list of elements that can be nested inside td element) |