The HTML Elements reference.

"colgroup" - html element

  • COLGROUP groups a set of 'col' elements.
  • It allows you to group several semantically related columns together.
  • Starttag <colgroup> is Required and endtag </colgroup> is Optional
  • Browsers that support the colgroup - element : Internet Explorer Mozilla Firefox Opera Google Chrome Apple Safari
Element "colgroup" example:
    <title>thead, tbody and tfoot element example</title>
    <table  border="8" cellspacing="5"
            cellpadding="5" align="center">
      <colgroup   >
        <col span="1" align="center" width="35" >
        <col span="1" align="left"   width="105" >
        <col span="2" align="right"  width="80" >
      <thead style="color:blue" >
          <td>Unit Price</td><td>Price</td></tr>
        <tr><td >2</td><td>Bread.</td>
        <tr><td >6</td><td>Beer.</td>
        <tr><td >1</td><td>Butter.</td>
      <tfoot style="color:red" >
          <td ></td><td >20.00</td></tr>

align (deprecated), char , charoff , class , dir , id , lang , span (Initial: 1), style , title , valign , width (deprecated)

Attribute "align" value(s): depend on which element left, center, right, justify or char
  • Specifies the horizontal alignment of its element with respect to the surrounding context. Specifies the alignment of data and the justification of text in a cell.
  • You should use styles (CSS) instead.
  • Differences in browser support for this attribute: Internet Explorer Mozilla Firefox Opera Google Chrome Apple Safari
Possible attribute, align, values for this element:
Attribute value description
left Left-flush data/Left-justify text. This is the default value for table data.
center Center data/Center-justify text. This is the default value for table headers.
right Right-flush data/Right-justify text.
justify Double-justify text.
char Align text around a specific character. If a user agent doesn't support character alignment, behavior in the presence of this value is unspecified.

© 2010 by Finnesand Data. All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the correctness in the pages or source codes.
The risk of using this web-site pages or any program codes from this website is entirely at the individual user.