w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



thead ... ⁄thead, optional element ⁄occurrences

The thead element is optional. 1 thead element allowed per 1 table element.
Examples

Valid Syntax 1
thead element absent; optional element
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>
<tbody>
<tr>...
<tr>...
<tbody>
</table>

</body>
</html>
Valid Syntax 2
1 thead element present
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>

<table>
<caption>...</caption>
<thead>
<tr>...</tr>
<tr>...</tr>
</thead>
<tfoot>...
<tbody>...
</table>

</body>
</html>
Invalid Syntax 3
multiple thead elements present; only 1 allowed
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>

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

</body>
</html>
thead intro thead browser display thead parents - children thead syntax