Skip to navigation

HTML Tag: colgroup

Column group in a table.

colgroup elements are children of table elements and should only ever appear after a caption element, if such an element is used.

Often used in conjunction with col.

Optional Attributes

Attribute Description Possible values
span The number of columns the colgroup element applies to. Number.
Global attributes


    <colgroup span="2" class="columns1and2"></colgroup>
    <!-- etc. -->

        <col class="column1">
        <col span="3" class="columns2and3and4">
        <th>Winter melon</th>
        <th>Bitter melon</th>
    <!-- etc. -->