w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



section nested within elements, elements nested within section

Classified as: flow content, sectioning content, palpable content

Parents, section

Children, section

Examples: section parents, section children

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

<section>
...
</section>

</body>
</html>
Valid Syntax 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>

<section>
...
<p>
...
</p>
</section>

</body>
</html>
Invalid Syntax 3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html>
<html>
<head>
<title>...</title>
<section>...</section>
</head>
<body>

<h1>
<section>
...
</section>
</h1>

</body>
</html>

Syntax 1: Valid, section nested within body: allowed
Syntax 2: Valid, p nested within section: allowed
Syntax 3: Invalid, section nested within head, h1: not allowed

section intro section browser display section syntax