COLS is an attribute of the <TABLE> tag which lets the browser know how many vertical columns are going to be in your table. Some Web authors contend that the browser will render the table faster if you use the COLS attribute. Here is an example:
<TABLE WIDTH="600" COLS="4" BORDER="1" >
The following table has four columns so COLS="4". Forget the fact that those cells in the first row are each spanning two columns and just count the tiny little cells that you can see, such as the ones in the second row. Also, forget the fact that the third row only has one cell -- because it is really spanning or crossing four columns.
COLSPAN is an attribute of the <TABLE> tag but is also an attribute of the <TH> and the <TD> tags where I have used it more often than with the <TABLE> tag. COLSPAN tells the browser when you want to have a particular table cell span or cross over more than one column. I have an example here:
Getting right down to business you can see examples of the COLSPAN attribute in the table above, in row 1 and row 3. In row 1, each cell is a heading cell (the text is centered) and it spans two columns. It was coded as:
The second row of the above table was coded like this:
The third row of the above table was coded like this: