Web Design / HTML

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

<col />

By Jennifer Kyrnin, About.com

<col /> Description:

The <col /> tag defines and controls the appearance of a column within a column group.

<col /> Web Browser Support:

<col /> Attributes:

<col /> End Tag:

None

<col /> Contents:

Nothing. <col /> is a singleton tag.

<col /> Valid Context:

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

<col /> Usage:

  • a table using columns and colgroups
    <table rules="cols" width="200">
    <colgroup>
    <col align="center"> <col valign="bottom">
    </colgroup>
    <tr><td>
    column one should be aligned to the center of this column.
    </td><td>
    and the second to the bottom.
    </td></tr>
    </table>
  • a 3-column table with two columns the same
    <table cellspacing="0" cellpadding="4" border="1" width="400" height="100">
    <col span="2" align="right" />
    <tr>
    <td>this column will be aligned to the right, but not the bottom</td>
    <td>and so will this column</td>
    <td>but this one won't</td>
    </tr>
    </table>

<col /> 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 <col /> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Web Design / HTML

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

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

All rights reserved.