Multiple Header Rows
You can add multiple header rows by placing more than one row before the
separator line. All rows above the first separator become <th> cells inside
<thead>.
Two header rows
Three header rows
| Level 1A | Level 1B |
| Level 2A | Level 2B |
| Level 3A | Level 3B |
| --------- | --------- |
| data | data |
Combined with column spanning
Multiple header rows pair naturally with column spanning to build rich hierarchical headers.
| | Q1 || Q2 ||
| | Jan | Feb | Mar | Apr |
| :----------- | ---: | ----: | ---: | -----: |
| Product A | 100 | 120 | 90 | 130 |
| Product B | 200 | 180 | 210 | 195 |
| Q1 | Q2 | |||
|---|---|---|---|---|
| Jan | Feb | Mar | Apr | |
| Product A | 100 | 120 | 90 | 130 |
| Product B | 200 | 180 | 210 | 195 |
<table>
<thead>
<tr>
<th style="text-align:left"></th>
<th colspan="2" style="text-align:right">Q1</th>
<th colspan="2" style="text-align:right">Q2</th>
</tr>
<tr>
<th style="text-align:left"></th>
<th style="text-align:right">Jan</th>
<th style="text-align:right">Feb</th>
<th style="text-align:right">Mar</th>
<th style="text-align:right">Apr</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">Product A</td>
<td style="text-align:right">100</td>
<td style="text-align:right">120</td>
<td style="text-align:right">90</td>
<td style="text-align:right">130</td>
</tr>
<tr>
<td style="text-align:left">Product B</td>
<td style="text-align:right">200</td>
<td style="text-align:right">180</td>
<td style="text-align:right">210</td>
<td style="text-align:right">195</td>
</tr>
</tbody>
</table>