You are here: Reference > HTML > attributes > colSpan (td, th)

colSpan attribute (td, th)

Browser support:
Sets how many columns wide a cell should be.
If you want to change how many rows high the cell should be, use the rowSpan attribute.
JavaScript page for this attribute: colSpan. You can find other example(s) there.

Possible values:

Integer that sets the number of columns to span.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the colSpan attribute:
<table border="3px" id="myTable">
        <td colspan="2">Apple</td>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content