HTML <col> span Atrybut
Przykład
Tutaj pierwsze dwie kolumny powinny mieć tło w kolorze czerwonym:
<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>
Definicja i użycie
span
Atrybut określa liczbę kolumn , które
<col>
powinien obejmować element .
Obsługa przeglądarki
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
Składnia
<col span="number">
Wartości atrybutów
Value | Description |
---|---|
number | Sets the number of columns a <col> element should span |
❮ Znacznik HTML <col>