<col> Column Tag

  • strict warning: Non-static method view::load() should not be called statically in /home/shab5676/public_html/sites/all/modules/views/views.module on line 879.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home/shab5676/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 589.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /home/shab5676/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 589.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /home/shab5676/public_html/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 149.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home/shab5676/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /home/shab5676/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.

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.

Attributes:

  • 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.

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


Head 1 Head 2
Data 1 More data