Tables

colgroup

Specifies groups of columns in a table. It is used to assign attribute values to a group columns for formatting. This tag can only be used within the table tag.

Syntax

<colgroup attributes></colgroup>

Example

<table>
   <colgroup span=”3” style=”color:red;”></colgroup>
   <tr>
      <td>row one</td>
   </tr>
   <tr>
      <td>row two</td>
   </tr>
</table>

Related tags

CSS Properties

HTML attributes

Search the Soup!