English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die Eigenschaft colspan definiert die Anzahl der Spalten, die die Zelle überspannen soll.
Eine HTML-Tabelle mit einer Zelle, die über zwei Spalten hinausgeht:
<table style="Breite:100%;" border="1"> <tr> <th>Lehre</th> <th>Price</th> </tr> <tr> <td>PHP Basic Course</td> <td align="char" char="." charoff="2">450.00</td> </tr> <tr> <td>Java Programming Course</td> <td align="char" char="." charoff="2">880.00</td> </tr> <tr> <td colspan="2">Total: 1330</td> </tr> </table>Test it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the colspan attribute.
Note:Only Firefox supports colspan="0", which has a special meaning (see the "Attribute Value" table below).
The colspan attribute defines the number of columns the cell should span.
None.
<td colspan="number">
Value | Description |
---|---|
number | Specify the number of columns the cell should span. Note: colspan="0" informs the browser to span the cell across to the last column of the column group (colgroup). |