colspan attribute instances for HTML <td> tags
Table cells span two columns of tables:
Browser support
So the browser supports the Colspan property.
There is no browser support for colspan= "0", this value has a special meaning. (See the description in the Attribute values table)
Grammar
<TD colspan= "value" >
Property value
| value |
Description |
| Number |
Sets the number of columns that a cell can span. Note: colspan= "0" indicates that the browser spans to the last column of the column group. |
HTML <td> Tag Instances
A simple HTML table that contains two rows of two columns:
Definition and usage
<td> tags define standard cells in an HTML table.
There are two types of cells in an HTML table:
- Header cell-Contains header information (created by th element)
- Standard cell-contains data (created by TD Element)
The text in the TD element is generally displayed as normal font and left-aligned.
The difference between HTML and XHTML
In HTML 4.01, the TD element's "bgcolor", "height", "width", and "nowrap" are not approved for use.
In the XHTML 1.0 Strict DTD, the TD element's "bgcolor", "height", "width", and "nowrap" are not supported.
colspan properties for HTML <td> tags