In this illustration we will inform you about the use and implementation of <colgroup> tag in html5. The <colgroup> tag is used to gather more than two columns in the table. This tag is used to do easy formatting of columns rather than changing the style of each cell one by one. This tag is used after <caption> tag and within <table> tag only. The <colgroup> tag can contain legal no. of column <col> tag only. This tag is used when we want same style for the columns.
This tag have an optional attribute "span". Other attributes like width, align, char, valign are not supported by html5.
The value of "span" attribute is an integer no i.e. no of columns to be grouped which must be a valid no.
<title>Example of Colgroup Tag</title>
<colgroup span="2" style="background:cyan"></colgroup>
Posted on: September 7, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles