w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



header nested within elements, elements nested within header

Classified as: flow content, palpable content

Parents, header

Children, header

Examples: header parents, header 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>

<header>

</header>

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

<header>
<p>
...
</p>
</header>

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

<h1>
<header>
...
</header>
</h1>

</body>
</html>

Syntax 1: Valid, header nested within body: allowed
Syntax 2: Valid, p nested within header: allowed
Syntax 3: Invalid, header, footer, main elements nested within header: not allowed
Syntax 4: Invalid, header nested within head, h1: not allowed

header intro header browser display header syntax