Easy Tutorial
❮ Prop Input Time Readonly Event Onerror Media ❯

td/thcolSpan Attribute


Definition and Usage

The colSpan attribute sets or returns the number of columns a table cell should span.

Syntax

Set the colSpan attribute:

Return the colSpan attribute:

Tip: There is no default value for the colSpan property.

Value Description
number Defines the number of columns to span

Browser Support

All major browsers support the colSpan attribute.


Example

The following example changes the number of columns a table cell spans:


❮ Prop Input Time Readonly Event Onerror Media ❯