Skip to content
HTML

Tabela com Thead Tbody Tfoot

Estruturar dados tabulares com thead, tbody, tfoot e caption em HTML.

#table#beginner

Code

html
<table>
  <caption>Employee Salaries</caption>
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Department</th>
      <th scope="col">Salary</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Alice</td>
      <td>Engineering</td>
      <td>$95,000</td>
    </tr>
    <tr>
      <td>Bob</td>
      <td>Sales</td>
      <td>$72,000</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="2">Total</td>
      <td>$167,000</td>
    </tr>
  </tfoot>
</table>