## COLGROUP

    span = number [CN]

  This attribute, which must be an integer > 0, specifies the number of columns in a column group. Values mean the following:

-   In the absence of a span attribute, each COLGROUP defines a column group containing one column.
-   If the span attribute is set to N > 0, the current COLGROUP element defines a column group containing N columns.

  User agents must ignore this attribute if the COLGROUP element contains one or more COL elements.
width = multi-length [CN]
  This attribute specifies a default width for each column in the current column group. In addition to the standard pixel, percentage, and relative values, this attribute allows the special form "0*" (zero asterisk) which means that the width of the each column in the group should be the minimum width necessary to hold the column's contents. This implies that a column's entire contents must be known before its width may be correctly computed. Authors should be aware that specifying "0*" will prevent visual user agents from rendering a table incrementally.
  This attribute is overridden for any column in the column group whose width is specified via a COL element.

Attributes defined elsewhere

- id, class (document-wide identifiers)

- lang (language information), dir (text direction)

- title (element title)

- style (inline style information )

- onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events )

- align, char, charoff, valign (cell alignment)

The COLGROUP element creates an explicit column group. The number of columns in the column group may be specified in two, mutually exclusive ways:

1. The element's span attribute (default value 1) specifies the number of columns in the group.

2. Each COL element in the COLGROUP represents one or more columns in the group.

The advantage of using the span attribute is that authors may group together information about column widths. Thus, if a table contains forty columns, all of which have a width of 20 pixels, it is easier to write:

       <COLGROUP span="40" width="20">
       </COLGROUP>

than:

       <COLGROUP>
          <COL width="20">
          <COL width="20">
          ...a total of forty COL elements...
       </COLGROUP>

When it is necessary to single out a column (e.g., for style information, to specify width information, etc.) within a group, authors must identify that column with a COL element. Thus, to apply special style information to the last column of the previous table, we single it out as follows:

       <COLGROUP width="20">
          <COL span="39">
          <COL id="format-me-specially">
       </COLGROUP>

The width attribute of the COLGROUP element is inherited by all 40 columns. The first COL element refers to the first 39 columns (doing nothing special to them) and the second one assigns an id value to the fortieth columns so that style sheets may refer to it.

The table in the following example contains two column groups. The first column group contains 10 columns and the second contains 5 columns. The default width for each column in the first column group is 50 pixels. The width of each column in the second column group will be the minimum required for that column.

    <TABLE>
    <COLGROUP span="10" width="50">
    <COLGROUP span="5" width="0*">
    <THEAD>
    <TR><TD> ...
    </TABLE>