HTML

Table Structure

Large tables can be organized using:

  • <thead> – Table header
  • <tbody> – Table body
  • <tfoot> – Table footer
  • <caption> – Table title
<table border="1">

    <caption>Student Result</caption>

    <thead>
        <tr>
            <th>Name</th>
            <th>Marks</th>
        </tr>
    </thead>

    <tbody>
        <tr>
            <td>Ram</td>
            <td>85</td>
        </tr>
    </tbody>

    <tfoot>
        <tr>
            <td>Total Students</td>
            <td>1</td>
        </tr>
    </tfoot>

</table>
Interactive Sandbox
HTML/CSS/JS