Easy Tutorial
❮ Att Col Width Att Q Cite ❯

HTML <td> colspan Attribute

HTML <td> Tag

Example

The following HTML table contains a table cell that spans across two columns:


Browser Support

All major browsers support the colspan attribute.

Note: Only Firefox supports colspan="0", which has a special meaning (see the "Attribute Values" table below).


Definition and Usage

The colspan attribute specifies the number of columns a cell should span.


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Values

Value Description
number Specifies the number of columns the cell should span. Note: colspan="0" instructs the browser to make the cell span to the last column of the column group (colgroup).

❮ Att Col Width Att Q Cite ❯