COLGROUP Element Sample

When COL elements are nested inside a COLGROUP element, the attributes of the COL elements override the attributes of the COLGROUP element.

The COLGROUP element specifies a black background. Black is rendered because the nested COL element did not specify anything for the background. However, the green font color that the COLGROUP element specifies is replaced by red which is specified by the COL element. Notice that the last column has no formatting even though COLGROUP spans over all three columns. This is because the nested COL element has the span attribute set to only the first two columns which overrides the COLGROUP span attribute.

This column is in the first group. This column is in the first group. This column is in the second group.
This column is in the first group. This column is in the first group. This column is in the second group.



[Right-click and choose View Source from the shortcut menu.]

© 2007 Microsoft Corporation. All rights reserved. Terms of use.