HTML <td> atributo colspan
Exemplo
Uma tabela HTML com uma célula de tabela que abrange duas colunas:
<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>
Definição e uso
O colspan
atributo define o número de colunas que uma célula deve abranger.
Suporte ao navegador
Attribute | |||||
---|---|---|---|---|---|
colspan | Yes | Yes | Yes | Yes | Yes |
Nota: Apenas o Firefox suporta colspan="0"
, que tem um significado especial (veja abaixo na tabela "Valores de atributos").
Sintaxe
<td colspan="number">
Valores de atributo
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) |
❮ Tag HTML <td>