Attributo HTML <col> span
Esempio
Qui, le prime due colonne dovrebbero avere un colore di sfondo rosso:
<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>
Definizione e utilizzo
L'
span
attributo definisce il numero di colonne su cui un
<col>
elemento dovrebbe occupare.
Supporto browser
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
Sintassi
<col span="number">
Valori di attributo
Value | Description |
---|---|
number | Sets the number of columns a <col> element should span |
❮ Tag HTML <col>