2.learn HTML - Tables Cheatsheet
2.learn HTML - Tables Cheatsheet
Tables
rowspan Attribute
Similar to colspan , the rowspan attribute on a table <table>
header or table data element indicates how many rows
<tr>
that particular cell should span within the table. The
<th>row 1:</th>
rowspan value is set to 1 by default and will take any <td>col 1</td>
positive integer up to 65534.
<td>col 2</td>
</tr>
<tr>
<th rowspan="2">row 2 (this row will
span 2 rows):</th>
<td>col 1</td>
<td>col 2</td>
</tr>
<tr>
<td>col 1</td>
<td>col 2</td>
</tr>
<tr>
<th>row 3:</th>
<td>col 1</td>
<td>col 2</td>
</tr>
</table>
colspan Attribute
The colspan attribute on a table header <th> or <table>
table data <td> element indicates how many columns
<tr>
that particular cell should span within the table. The
colspan value is set to 1 by default and will take any <th>row 1:</th>
positive integer between 1 and 1000. <td>col 1</td>
<td>col 2</td>
<td>col 3</td>
</tr>
<tr>
<th>row 2:</th>
<td colspan="2">col 1 (will span 2
columns)</td>
<td>col 2</td>
<td>col 3</td>
</tr>
</table>