w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



figure nested within elements, elements nested within figure

Classified as: flow content, sectioning root, palpable content

Parents, figure

Children, figure

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

<figure>

</figure>

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

<figure>
<figcaption> ...</figcaption>
...
</figure>

<figure>
...
<figcaption> ...</figcaption>
</figure>

<figure>
...
</figure>

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

<h1>
<figure> ...</figure>
</h1>

</body>
</html>

Syntax 1: Valid, figure nested inside body: allowed
Syntax 2: Valid, figcaption nested inside figure as first child, last child or absent: allowed
Syntax 3: Invalid, figure nested inside head, h1: not allowed

figure intro figure browser display figure syntaxfigure figcaption 1 examplefigure figcaption 3 examples