HTML <th> colspan- kenmerk

❮ HTML <de> merker

Voorbeeld

'n HTML-tabel met 'n kopsel wat oor twee kolomme strek:

<table>
  <tr>
    <th colspan="2">Monthly Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$80</td>
  </tr>
</table>

Definisie en gebruik

Die colspankenmerk definieer die aantal kolomme wat 'n kopsel moet strek.


Blaaierondersteuning

Attribute
colspan Yes Yes Yes Yes Yes

Let wel: Slegs Firefox ondersteun colspan="0", wat 'n spesiale betekenis het (kyk hieronder in die "Kenmerkwaardes"-tabel).


Sintaksis

<th colspan="number">

Eienskapwaardes

Value Description
number Sets the number of columns a header cell should span. Note: colspan="0" tells the browser to span the cell to the last column of the column group (colgroup)

❮ HTML <de> merker