<COL ...> sets properties for a column of table cells. <COL ...> is an HTML 4.0 tag. Currently only MSIE and Netscape 6 recognize it.
<COL ...> goes after the <TABLE ...> tag and before any
<TR ...>,
<THEAD ...>, or
<TBODY ...> elements. (It may go inside a
<COLGROUP ...> element but it doesn't have to.)
Each <COL ...> defines the properties of one column, unless you use
SPAN to indicate that it is for more than one
column. So the first <COL ...> sets the properties for the first
column, the second<COL ...> sets the properties for the second column,
and so on.
For example, the following code uses three <COL ...> tags to set properties of the cells in the first, second, and third columns of the table. The first <COL ...> doesn't do anything except serve a placeholder for the first column. The second<COL ...> uses the
ALIGN attribute to right align all the cells in the second column. The third<COL ...> uses STYLE to set the styles of the cells in the third column so that the font color is red:
It's important to be absolutely clear on this point:<COL ...> does not create columns. It merely sets the properties of columns that will be defined later in the code. Cells are not "contained" in <COL ...> elements, they just set attributes which are applied to the cells in that column position.