w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



body nested within elements, elements nested within body

Classified as: sectioning root

Parents, body

Children, body

Examples: body parents, body children

Valid Syntax 1
1
2
3
4
5
6
7
8
9
<!doctype html>
<html>
<head>

<⁄head>
<body>

<⁄body>
<⁄html>
Valid Syntax 2
1
2
3
4
5
6
7
8
9
<!doctype html>
<html>



<body>

<⁄body>
<⁄html>
Valid Syntax 3
1
2
3
4
5
6
7
8
9
10
11
12
13
<!doctype html>
<html>
<head>

<⁄head>
<body>
<a>...<⁄a>
<abbr>...<⁄abbr>
<address>...<⁄address>
<article>...<⁄article>
...
<⁄body>
<⁄html>


Syntax 1: Valid, body element nested inside html right after the head element (if head present)
Syntax 2: Valid, body element nested inside html (head absent, head element is optional)
Syntax 3: Valid, all elements classified as flow content can be nested within the body element (see above: "Children, body element")

body intro body occurrences body browser display body syntax, optional