Syntax
<COLGROUP>...</COLGROUP>
Attribute Specifications
SPAN=Number (number of columns in group)
WIDTH=MultiLength (width of each column)
ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)
CHAR=Character (alignment character for cells)
CHAROFF=Length (alignment character offset)
VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group)
common attributes
Contents:
Zero or more COL elements
Contained in:
TABLE
<TABLE SUMMARY="This table gives the character entity reference, decimal character reference, and hexadecimal character reference for 8-bit Latin-1 characters, as well as the rendering of each in your browser." width=300 border=1>
<COLGROUP>
<COLGROUP SPAN=3>
<COLGROUP SPAN=3>
<THEAD>
<TR>
<TH SCOPE=col ROWSPAN=2>Character</TH>
<TH SCOPE=col ROWSPAN=2>Entity</TH>
<TH SCOPE=col ROWSPAN=2>Decimal</TH>
<TH SCOPE=col ROWSPAN=2>Hex</TH>
<TH SCOPE=colgroup COLSPAN=3>Rendering in Your Browser</TH>
</TR>
<TR>
<TH SCOPE=col>Entity</TH>
<TH SCOPE=col>Decimal</TH>
<TH SCOPE=col>Hex</TH>
</TR>
</THEAD>
<TBODY>
<TR>
<TD SCOPE=row>non-breaking space</TD>
<TD>&nbsp;</TD>
<TD>&#160;</TD>
<TD>&#xA0;</TD>
<TD> </TD>
<TD> </TD>
<TD> </TD>
</TR>
...
</TBODY>
</TABLE>
| Character | Entity | Decimal | Hex | Rendering in Your Browser | ||
|---|---|---|---|---|---|---|
| Entity | Decimal | Hex | ||||
| non-breaking space | |   |   | |||
|
In place of the <COLGROUP SPAN=3> tag in the preceding example, a COLGROUP with three COL elements could have been used:
<COLGROUP> COLGROUP also takes a number of presentational attributes, many of which cannot be completely replaced by style sheets. Since few browsers support COLGROUP, authors may wish to specify these attributes on the TD or TH elements instead. The WIDTH attribute specifies a width for each column in the group. The value must be a number in pixels, a percentage of the table width, or a relative length expressed as i* where i is an integer. A column with WIDTH="3*" will be allotted three times the width of a column with WIDTH="1*". The value 0* is equivalent to the minimum width necessary for the column's contents. The ALIGN attribute specifies the horizontal alignment for each cell in the column group. Possible values are left, center, right, justify, and char. ALIGN=char aligns a cell's contents on the character given in the CHAR attribute. The default value for the CHAR attribute is the decimal point of the current language--a period in English. The CHAROFF attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; CHAROFF="50%" centers the alignment character horizontally in a cell. The VALIGN attribute specifies the vertical position of a cell's contents. Possible values are:
top, which positions data at the top of the cell; |