Atributo de intervalo HTML <col>
Ejemplo
Aquí, las dos primeras columnas deben tener un color de fondo rojo:
<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>
Definición y uso
El
span
atributo define el número de columnas
<col>
que debe abarcar un elemento.
Compatibilidad con navegador
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
Sintaxis
<col span="number">
Valores de atributos
Value | Description |
---|---|
number | Sets the number of columns a <col> element should span |
❮ Etiqueta HTML <col>