Tables

scope="colgroup"

Associates a header with a column group defined in the table structure. Anchor the header in an actual column group and use a matching colspan when spanning its columns. On th only; missing or invalid value uses automatic header association. For complex tables consider explicit headers and id associations.

Formal Syntax & Structure

html syntaxhtml
scope="colgroup"

Parameters & Attributes

NameTypeDescription
scopekeywordAssociates a header with a column group defined in the table structure. Anchor the header in an actual column group and use a matching colspan when spanning its columns.

Working Example

Example Snippethtml
<table>  <caption>Sales</caption>  <colgroup span="2"></colgroup>  <thead>    <tr>      <th scope="colgroup" colspan="2">Quarter one</th>    </tr>    <tr>      <th scope="col">January</th>      <th scope="col">February</th>    </tr>  </thead>  <tbody>    <tr>      <td>12</td>      <td>15</td>    </tr>  </tbody></table>
HTML Reference