HTML | <colgroup> Tag

This tag is used to specify the group of one or more columns in a table for formatting. It is useful for applying styles to entire columns, instead of repeating the styles for each column, and for each row. Use the <col> tag within the <colgroup> tag to define different properties to a column within a <colgroup>.

Note: Most of the attributes in HTML 4.01 <colgroup> are not supported in HTML5.


<colgroup> Column lists... </colgroup>


  • align: It is used to align the text or content in the group of column. The value of align property are left, right, center, justify, char.
  • char: It is used to align the character in a column group and the value of this attributes are character.
  • charoff: It is used to sets the number of characters that will be aligned from the character specified by the char attribute. The value of this attributes are in numeric form.
  • span: It is used to specify the number of columns that have colgroup tag. The values are in numeric form.
  • valign: It specifies the vertical align of content in a colgroup. It’s values are top, middle, bottom, baseline.
  • width: It defines the width of a column group. It’s values are pixels, %, relative_length.

Note: Most of the attributes are not supported by <colgroup> tag in HTML5.






<!DOCTYPE html>
            table, th, td {
                border: 1px solid black;
            h2, h3 {
            <h3><colgroup> tag</h3>
                    <col span="2" 
                    <col style="background-color:tomato">
                    <td>Manas Chhabra</td>
                    <td>Mukul Gupta</td>
                    <td>B tect</td>



Supported Browsers: The <colgroup> tag supported browsers listed below.

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Improved By : shubham_singh, nidhi_biet