Name

COLSPAN — NN all IE all HTML 3.2

Synopsis

COLSPAN=”columnCount"

Optional

The COLSPAN attribute specifies the number of columns across which the current table cell should extend itself. For each additional column included in the COLSPAN count, one less TH or TD element is required for the table row. If you set the ALIGN attribute to center or right, the alignment is calculated on the full width of the TH element across the specified number of columns. Unless the current cell is also specifies a ROWSPAN attribute, the next table row returns to the original column count.

Example

<TH COLSPAN=2 ALIGN="right">

Value

Any positive integer, usually 2 or larger.

Default

1

Object Model Reference

IE

[window.]document.all.elementID.colSpan

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.