New! My 44-page ebook "CSS in 44 minutes" is out! 😃

Get it now →

# th

Defines a table header. Must be a direct child of a <tr>.

Example: Copy

World Cup winners
Location Score
Continent Country First Total
South America Uruguay 1930 2
Brazil 1958 5
Argentina 1978 2
Europe Italy 1934 4
Germany 1954 4
England 1966 1
France 1998 1
Spain 2010 1
<table>
  <thead>
    <tr>
      <th colspan="4">World Cup winners</th>
    </tr>
    <tr>
      <td colspan="2">Location</td>
      <td colspan="2">Score</td>
    </tr>
    <tr>
      <td>Continent</td>
      <td>Country</td>
      <td>First</td>
      <td>Total</td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td rowspan="3">South America</td>
      <td>Uruguay</td>
      <td>1930</td>
      <td>2</td>
    </tr>
    <tr>
      <td>Brazil</td>
      <td>1958</td>
      <td>5</td>
    </tr>
    <tr>
      <td>Argentina</td>
      <td>1978</td>
      <td>2</td>
    </tr>
    <tr>
      <td rowspan="5">Europe</td>
      <td>Italy</td>
      <td>1934</td>
      <td>4</td>
    </tr>
    <tr>
      <td>Germany</td>
      <td>1954</td>
      <td>4</td>
    </tr>
    <tr>
      <td>England</td>
      <td>1966</td>
      <td>1</td>
    </tr>
    <tr>
      <td>France</td>
      <td>1998</td>
      <td>1</td>
    </tr>
    <tr>
      <td>Spain</td>
      <td>2010</td>
      <td>1</td>
    </tr>
  </tbody>
</table>

colspan

Defines how many columns a cell should span across.

"3"

You can use any integer.

rowspan

Defines how many rows a cell should span across.

"2"

You can use any integer.