Easy Tutorial
❮ Att Font Color Html Headings ❯

HTML <th> colspan Attribute

HTML <th> Tag

Example

The following HTML table contains a header 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 header cell should span.


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Values

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

❮ Att Font Color Html Headings ❯