<col> Column Tag

The <col> element sets attributes that will be used for all cells in a table column. <col> is very useful for defining what a column will look like without defining each cell individually, and can only be used within tables. <col> is valid in all browsers, but since most attributes have limited support, it is best to use CSS to define how the column will look.


  • align: Sets the alignment of the content within the column. Possible values are left, right, center, justify, char. This attribute is only valid in IE and Opera. IE does not recognize justify.
  • char: Sets the character to align on if the char align option is used. char is not recognized by any major browser. The default is a decimal point.
  • charoff: Sets the number of characters the content will be aligned from the character specified by the char attribute. The charoff attribute is not supported in any major browser.
  • span: Sets the number of columns the column should span. Not supported in Firefox.
  • valign: Sets the vertical alignment of the column. Options are middle, bottom, baseline. Not supported in Firefox.
  • width: Sets the width of the column. Can be set in percents, pixels, or relative length. Valid in all major browsers.

<table border="1" width="100%">
<col width="50%" />
<col width="50%" />
<th>Head 1</th>
<th>Head 2</th>
<td>Data 1</td>
<td>More data</td>

Head 1 Head 2
Data 1 More data