HTML <col> span Attribuut
Voorbeeld
Hier moeten de eerste twee kolommen een rode achtergrondkleur hebben:
<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>
Definitie en gebruik
Het
span
attribuut definieert het aantal kolommen dat een
<col>
element moet overspannen.
Browserondersteuning
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
Syntaxis
<col span="number">
Attribuutwaarden
Value | Description |
---|---|
number | Sets the number of columns a <col> element should span |
❮ HTML <col>-tag