script nested within elements, script statements inside script
Classified as: metadata content, flow content, phrasing content, script-supporting elements
Parents, script element
Children, script element
Examples: script parents, script children
1 2 3 4 5 6 7 8 9 10 11 12 | <!doctype html> <> <> <>...</> <> </> </> <> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 | <!doctype html> <> <> <>...</> </> <> <> </> </> </> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | <!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> <> <> <>...</> </> <> <> <> <> ... </> </> ... </> <> <> ... </> </> </> </> |
Syntax 1: Valid, script nested inside head: allowed
Syntax 2: Valid, script nested inside body: allowed
Syntax 3: Valid, script elements (inline, external) nested inside head and body elements: allowed
Syntax 4: Invalid, script nested inside colgroup: not allowed; p nested inside script: not allowed