<colgroup> tag in HTML

The <colgroup> tag is used to specifies properties for a group of one or more columns in a table for formatting.

Important Description

  • The <colgroup> for applying styles to entire columns, instead of repeating the styles for each cell.
  • The <colgroup> tag must be closed in XHTML.
  • The <colgroup> tag must be a child of a <table> element.
  • Use the <col> tag within the <colgroup> tag to define different properties to a column.

Example of <colgroup> tag

Result Look Like

Title Descriptions
HTML Hyper Text Markup Language
CSS Cascading Style Sheets

<colgroup> Tag Browser Support

Element Chrome Edge Firefox Safari Opera
<colgroup> Yes Yes Yes Yes Yes

Global Attributes

Event Attributes


Most of the attributes in HTML 4.01 are not supported in HTML5.

Attribute Value Description
align right
Defines horizontal alignment, not supported in HTML5.
char character Defines a character to use to align text on (use with align = "char"), not supported in HTML5.
charoff number Specifies the number of characters the content will be aligned from the character by the char attribute, not supported in HTML5.
span number Specifies the number of columns a column group should span
valign top
Vertical aligns the content in a column group, not supported in HTML5.
width %
Specifies the width of a column group, not supported in HTML5.

Advertise With Us

We offer sponsored posts and guest posts with do-follow links, back-links, and other advertising services, To advertise email us at ""

© 2021 GDATAMART.COM (All Rights Reserved)