1. Home
  2. Computing & Technology
  3. Web Design / HTML

<colgroup></colgroup>

By Jennifer Kyrnin, About.com

<colgroup> Description:

The <colgroup></colgroup> tag creates and defines an explicit column group in a table.

<colgroup> Web Browser Support:

<colgroup> Attributes:

<colgroup> End Tag:

</colgroup> Usually omitted in HTML 4. Required in XHTML.

<colgroup> Contents:

column contents. The following tag is valid within the <colgroup></colgroup> tag:
col

<colgroup> Valid Context:

The <colgroup></colgroup> tag is valid within the following tag:
table

<colgroup> Usage:

  • a table using columns and colgroups
    <table rules="cols" width="300"> <colgroup align="center" span="2"></colgroup> <colgroup valign="bottom"></colgroup> <tr><td> column one should be aligned to the center of this column. </td><td> col 2 is part of the same group. </td><td> and the third to the bottom. </td></tr> </table>

<colgroup> Special Notes:

  • The function of this tag is to provide more control over the look and feel of the individual columns in a table.
  • Use this tag judiciously, as it's not well supported even in the browsers that support it.

More <colgroup></colgroup> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. HTML Tags
  7. The colgroup Element - Creates an explicit column group - XHTML 1.0 HTML 4.0

©2008 About.com, a part of The New York Times Company.

All rights reserved.