w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



th nested within elements, elements nested within th

Classified as: interactive content (if sorted attribute is present on th element)

Parents, th

Children, th

Examples: th parents, th children

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

<table>
<caption>...</caption>
<thead>
<tr><th>...</th></tr>
</thead>
...
</table>

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

<table>
<caption>...</caption>
<thead>
<tr><th><b>...</b></th></tr>
</thead>
...
</table>

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

<th>...
<p>
<th>
<h1>...</h1>
</th>
</p>

</body>
</html>

Syntax 1: Valid, th nested within tr: allowed
Syntax 2: Valid, b nested within th: allowed
Syntax 3: Invalid, th nested within elements(head, body, p) other than tr: not allowed; h1 nested within th: not allowed

th intro th optional, occurrences th browser display th syntaxth, td colspan, rowspan attributesth, td, headers attribute