HTML: The Markup Language

colgrouptable column group # T

The colgroup element represents a group of one or more columns in the table that is its parent.

Permitted content #

zero or more col elements, or an optional span attribute

Permitted attributes #

Descriptions for attributes specific to this element #

span = positive integer
The number of columns in the group.

Additional constraints and admonitions #

Tag omission #

A colgroup element's start tag may be omitted if the first thing inside the colgroup element is a col element, and if the element is not immediately preceded by another colgroup element whose end tag has been omitted.

A colgroup element’s end tag may be omitted if the colgroup element is not immediately followed by a space character or a comment.

Permitted parent elements #


DOM interface #

interface HTMLTableColElement : HTMLElement {
           attribute unsigned long span;

Typical default display properties #

colgroup {
display: table-column-group; }