Atributo HTML <col> span
Exemplo
Aqui, as duas primeiras colunas devem ter uma cor de fundo vermelha:
<table>
<colgroup>
<col span="2" style="background-color:red">
<col style="background-color:yellow">
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>
Definição e uso
O
span
atributo define o número de colunas que um
<col>
elemento deve abranger.
Suporte ao navegador
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
Sintaxe
<col span="number">
Valores de atributo
Value | Description |
---|---|
number | Sets the number of columns a <col> element should span |
❮ Tag HTML <col>