Table Header, Body, and Footer
- Every table contains header, body and footer
- Body part contains table.
- Header and Footer just working like in word document and these are with same content for every page.
- <thead> – to create a separate table header.
- <tbody> – to indicate the main body of the table.
- <tfoot> – to create a separate table footer.
<!DOCTYPE html>
<html>
<body>
<table border="1" width="100%">
<thead>
<tr>
<td colspan="4">Table Header</td>
</tr>
</thead>
<tbody>
<tr><th>Name</th><th>Salary</th></tr>
<tr><td>Amar</td><td>35000</td></tr>
<tr><td>Annie</td><td>50000</td></tr>
</tbody>
<tfoot>
<tr>
<td colspan="4">Table Footer</td>
</tr>
</tfoot>
</table>
</body>
</html>