Name
Column
Description
Defines the characteristics of columns in a table. Must be used within
the COLGROUP 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 COL will span.
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 COLGROUP tag.
Example
Code
<table border="1" cellpadding="1" cellspacing="2">
<colgroup span="3">
<col width="100">
<col width="150">
<col width="200">
</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 |
© Martin Allen 1999 - 2006. Last updated Sunday 01 October 2006 07:18:19 PM +0100.
|