This browser does not support basic Web standards, preventing the display of our site's intended design. May we suggest that you upgrade your browser?
Note: The HTML pages are out-of-date and will not be updated.
Varying the span of columns in a table can be helpful for grouping information, adding emphasis, or eliminating empty cells. In the first example below, an empty cell would have occurred next to "green" in the third column, as there is no data to fill in; adjusting the column span makes it clear that "green" is the only entry. In the second example, adding the COLSPAN attribute to the <TD> code allows the titles to span two columns. In order to adjust the column span of one cell, place the column span attribute before the data within the <TD> or <TH> code for that cell.
|
<TABLE BORDER=1> |
||||||
|
<TABLE BORDER=1> <TR> <TH COLSPAN=2>Colors 1</TH> <TH COLSPAN=2>Colors 2</TH> </TR> <TR> <TD>Red</TD> <TD>Green</TD> <TD>Blue</TD> <TD>Black</TD> </TR> <TR> <TD>Orange</TD> <TD>Yellow</TD> <TD>Purple</TD> <TD>Tan</TD> </TR> <TR> <TD>Pink</TD> <TD>Gray</TD> <TD>White</TD> <TD>Cream</TD> </TR> </TABLE> |
||||||||||||||||