HTML <grupa_kolumn> span Atrybut
Przykład
Ustaw kolor tła pierwszych dwóch kolumn za pomocą atrybutu span <grupa kol>:
<table>
<colgroup span="2" style="background:red"></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>
<tr>
<td>5869207</td>
<td>My first CSS</td>
<td>$49</td>
</tr>
</table>
Definicja i użycie
span
Atrybut określa liczbę kolumn , które
<colgroup>
powinien obejmować element .
Wskazówka: aby zdefiniować różne właściwości kolumny w ramach
<colgroup>
, użyj <col>
tagu w
<colgroup>
tagu.
Obsługa przeglądarki
Attribute | |||||
---|---|---|---|---|---|
span | Yes | Yes | Yes | Yes | Yes |
Składnia
<colgroup span="number">
Wartości atrybutów
Value | Description |
---|---|
number | Sets the number of columns a column group should span |
❮ Znacznik HTML <grupa kol>