Name
colSpan — NN n/a IE 4 DOM 1
Synopsis
Read/Write
The number of columns across which the current table cell should
extend itself. For each additional column included in the
colSpan
count, one less TD
element is required for the table row. If you set the
align
property to center
or
right
, the alignment is calculated on the full
width of the TD
element across the specified
number of columns. Unless the current cell also specifies a
ROWSPAN
attribute, the next table row returns to
the original column count.
Example
document.all.myTD.colSpan = 2
Value
Any positive integer, usually 2 or larger.
Default
1
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.