HTML <colgroup> yayılma Özelliği

❮ HTML <colgroup> etiketi

Örnek

<colgroup> yayılma özelliğini kullanarak ilk iki sütunun arka plan rengini ayarlayın:

<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>

Tanım ve Kullanım

Nitelik , bir öğenin kapsaması gereken spansütun sayısını tanımlar . <colgroup>

İpucu: içindeki bir sütuna farklı özellikler tanımlamak <colgroup>için <col>etiket içindeki <colgroup>etiketi kullanın.


Tarayıcı Desteği

Attribute
span Yes Yes Yes Yes Yes

Sözdizimi

<colgroup span="number">

Özellik Değerleri

Value Description
number Sets the number of columns a column group should span

❮ HTML <colgroup> etiketi