Name
Column Group
Description
Defines the characteristics of columns in a table. Must be used within
the TABLE tag. It is possible to create columns
in tables without the COLGROUP tag.
Attributes
ALIGN
Specifies the horizontal alignment of the content in the cells. The
possible values are:
| Value |
| center |
| justify |
| left |
| right |
SPAN
Specifies how many columns the COLGROUP will affect.
VALIGN
Specifies the vertical alignment of the content in the cells. The
possible values are:
| Value |
| baseline |
| bottom |
| middle |
| top |
WIDTH
Specifies the width of the column. This attribute has priority over the
COLGROUP width attribute.
Related Tags
The COL tag is used within the TABLE tag.
Example
Code
<table border="1" cellpadding="1" cellspacing="2">
<colgroup span="2" align="center"
width="300">
</colgroup>
<tr>
<td>Cell contents</td>
<td>Cell contents</td>
<td>Cell contents</td>
</tr>
<tr>
<td>Cell contents</td>
<td>Cell contents</td>
<td>Cell contents</td>
</tr>
</table>
Generates
| Cell contents |
Cell contents |
Cell contents |
| Cell contents |
Cell contents |
Cell contents |
As COLGROUP was set to span 2 columns, the width and align attributes only
affect the first two columns in the table.
© Martin Allen 1999 - 2006. Last updated Sunday 01 October 2006 07:19:44 PM +0100.
|