HTML Tutorial
<thead>
tag defines the header of a table.<table>
element.<thead>
:<table>
<thead>
<th>Name</th>
<th>Age</th>
<th>Occupation</th>
</thead>
<tbody>
<tr>
<td>John Smith</td>
<td>30</td>
<td>Teacher</td>
</tr>
</tbody>
</table>
<table>
<thead>
<th align="left">Name</th>
<th align="right">Age</th>
<th align="center">Occupation</th>
</thead>
</table>
Simple HTML Example:
<head>
<title>Table with Header</title>
</head>
<body>
<table>
<thead>
<th>Name</th>
<th>Age</th>
<th>Occupation</th>
</thead>
<tbody>
<tr>
<td>John Smith</td>
<td>30</td>
<td>Teacher</td>
</tr>
</tbody>
</table>
</body>
id
attribute to the <thead>
for referring to it in CSS or JavaScript.<thead>
tag for purely styling purposes, as it should only be used to indicate header content.