HTML <td> atribut colspan
Příklad
HTML tabulka s buňkou tabulky, která zahrnuje dva sloupce:
<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>
Definice a použití
Atribut colspan
definuje počet sloupců, které by měla buňka obsahovat.
Podpora prohlížeče
Attribute | |||||
---|---|---|---|---|---|
colspan | Yes | Yes | Yes | Yes | Yes |
Poznámka: Pouze Firefox podporuje colspan="0"
, což má zvláštní význam (podívejte se níže v tabulce "Hodnoty atributů").
Syntax
<td colspan="number">
Hodnoty atributů
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 tag <td>