July 5th, 2007
Tables in HTML - Part Two
To merge several cells into one, you need to create what is called a spanning cell, which just happens to be a cell that spans more than one row or column in a table. To span a column or td, we use colspan. To span more than one row or tr, we use rowspan. The basic syntax for the colspan attribute is:
<td colspan=”2″>
When you create your tables you should always have an equal number of columns and colspan allows you to do just that.
The basic syntax for the rowspan attribute is:
<tr rowspan=”2″>
HTML Table Example
This example shows HTML tables using colspan,rowspan, and nested tables. Please view table example code here.
|
|
| Date | 8:00AM | 2:00PM | 8:00PM |
Filed under: HTML


