w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



hgroup nested within elements, elements nested within hgroup

Classified as: flow content, heading content, palpable content

Parents, hgroup

Children, hgroup

Examples: hgroup parents, hgroup children

Valid Syntax 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!doctype html>
<html>
<head>
<title>...</title>
</head>
<body>
<hgroup>
...
</hgroup>

<section>
<hgroup>
...
</hgroup>
</section>

<article>
<header>
<hgroup>
...
</hgroup>
</header>
<article>
</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>

<hgroup>
<h1>...</h1>
<h2>...</h2>
...
</hgroup>

</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>
<hgroup>...</hgroup>
</head>
<body>

<p>
<hgroup>
<img>
<dl>...</dl>
<table>...</table>
...
</hgroup>
</p>

</body>
</html>

Syntax 1: Valid, hgroup nested within body, section, header: allowed
Syntax 2: Valid, h1, h2 elements nested within hgroup: allowed
Syntax 3: Invalid, hgroup nested within head, p: not allowed; elements (img, dl, table) other than h1, h2, h3, h4, h5, h6 nested within hgroup: not allowed

hgroup intro hgroup browser display hgroup outlinehgroup syntax