typestar

Table sections and scope in HTML

Head, body and foot sections, with scope telling each header what it labels.

<table>
  <thead>
    <tr>
      <th scope="col">Tour</th>
      <th scope="col">Steps</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">Basics</th>
      <td>60</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <td colspan="2">Updated hourly</td>
    </tr>
  </tfoot>
</table>

How it works

  1. thead, tbody and tfoot group the rows by role.
  2. scope says whether a header labels a column or a row.
  3. colspan lets a summary cell span several columns.

The run, in numbers

Lines
19
Characters to type
229
Tokens
101
Three-star pace
70 tpm

At the three-star pace of 70 tokens a minute, this run takes about 87 seconds.

Type this snippet

Step 2 of 4 in Tables, step 24 of 28 in Document structure.

← Previous Next →