Table of Contents
Table Header, tbody and Footer
- Tables are categories into three parts: a header, a body, and a foot.
- The three elements for separating the head, body, and foot of a table.
- Using this element to create a separate table header (always show in the top position).
- Using this element to create the main body of the table(always show in the middle position).
- Using this element to create a separate table footer(always show in bottom).
First Program in HTML
<html>
<head>
<title>HTML Table</title>
</head>
<body>
<table border="1" width="100%">
<thead>
<tr>
<td colspan="4">This is the head of the table</td>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="4">This is the foot of the table</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
</tbody>
</table>
</body>
</html>