HTML <colgroup> tag


Defines a group of table columns.



<table border="1">
<colgroup span="4">
<col width="30"></col>
<col width="20"></col>
<col width="10"></col>
<col width="50"></col>



1 2 3 4

Required Attributes

  • none

Optional Attributes

  • align - right, left, center, justify, char - alignment of text within the column
  • char - specifies the character that the text should be aligned around; not supported by many browsers
  • charoff - the number of pixels to offset the alignment by; again not supported by many browsers
  • span - specifies how many columns the <col> tag should span
  • valign - top, middle, bottom, baseline - vertical alignment of the cell text
  • width - width of the column

Core Attributes