Updates
  • Starting New Weekday Batch for Full Stack Java Development on 27 September 2025 @ 03:00 PM to 06:00 PM
  • Starting New Weekday Batch for MERN Stack Development on 29 September 2025 @ 04:00 PM to 06:00 PM
Join Course

Table header, body and footer

• <thead>: The <thead> tag represents the header section of a table. It typically contains one or more rows (<tr>) that define the column headers of the table. The content placed within <thead> is usually bold and centered, indicating the titles of each column.
• <tbody>: The <tbody> tag represents the body section of a table. It contains the main data rows of the table. The content placed within <tbody> is the actual data that populates the table's rows and columns.
• <tfoot>: The <tfoot> tag represents the footer section of a table. It is used to place summary information or additional details at the bottom of the table. The content within <tfoot> often contains totals, averages, or any other relevant information.

            
<!DOCTYPE html>
<html>
<head>
    <title>Table header,body and footer</title>
    <style>
        table, th, td {
        width:300px;
        border: 3px;
        border-style: solid;
        border-collapse: collapse;
        }
        </style>
</head>
<body>
    <h1>Table header,body and footer</h1>
    <table>
  <thead>
    <tr>
      <th>Column 1</th>
      <th>Column 2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Data 1A</td>
      <td>Data 1B</td>
    </tr>
    <tr>
      <td>Data 2A</td>
      <td>Data 2B</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td>Total A</td>
      <td>Total B</td>
    </tr>
  </tfoot>
</table>
</body>
</html>