Tsallaka zuwa abun ciki
Justice Tech School

Table Caption, Head, Body and Foot

caption titles a table. thead, tbody and tfoot group rows so styles and accessibility tools understand the structure. colgroup styles whole columns.

Example
<table border="1" style="border-collapse:collapse">
  <caption>Scores</caption>
  <thead><tr><th>Name</th><th>Score</th></tr></thead>
  <tbody><tr><td>Ada</td><td>90</td></tr><tr><td>Bob</td><td>80</td></tr></tbody>
  <tfoot><tr><td>Total</td><td>170</td></tr></tfoot>
</table>

Exercise

Title the table.

<table><>Scores</caption>

Quiz Test

Which element groups header rows?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.