HTML <td> colspan- kenmerk
Voorbeeld
Een HTML-tabel met een tabelcel die twee kolommen omspant:
<table>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
<tr>
<td colspan="2">Sum: $180</td>
</tr>
</table>
Definitie en gebruik
Het colspan
attribuut definieert het aantal kolommen dat een cel moet beslaan.
Browserondersteuning
Attribute | |||||
---|---|---|---|---|---|
colspan | Yes | Yes | Yes | Yes | Yes |
Opmerking: alleen Firefox ondersteunt colspan="0"
, wat een speciale betekenis heeft (kijk hieronder in de tabel "Kenmerkwaarden").
Syntaxis
<td colspan="number">
Attribuutwaarden
Value | Description |
---|---|
number | Specifies the number of columns a cell should span. Note: colspan="0" tells the browser to span the cell to the last column of the column group (colgroup) |
❮ HTML <td>-tag