w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



summary nested within elements, elements nested within summary

Classified as: -

Parents, summary

Children, summary

Examples: summary parents, summary children

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

<details>
<summary>
...
</summary>
...
</details>

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

<details>
<summary>...<b>...</b></summary>
...
</details>

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

<summary>...</summary>

<p>
<summary>...</summary>
</p>

</body>
</html>

Syntax 1: Valid, summary nested within details (as its first child): allowed
Syntax 2: Valid, b nested within summary: allowed
Syntax 3: Invalid, summary nested within elements(head, body, p) other than details: not allowed

summary intro summary optional element, occurrences summary browser display summary syntax