tFoot property

The tFoot property stores a reference to the tfoot of a table.

Syntax

javascripttable.tFoot;

Example

We color a table footer red:

html<table id="table">
  <thead>
    <tr>
      <th>header1</th>
      <th>header2</th>
      <th>header3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>value</td>
      <td>value</td>
      <td>value</td>
    </tr>
    <tr>
      <td>value</td>
      <td>value</td>
      <td>value</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td>result</td>
      <td>result</td>
      <td>result</td>
    </tr>
  </tfoot>
</table>
javascriptlet table = document.querySelector('#table');
table.tFoot.style.color = 'red';

See also

  • the tHead property
    that contains thead of a table
  • the tBodies property
    that contains tbody of a table
  • the rows property
    that contains rows of a table
  • the cells property
    that contains table cells