basics of website design banner photo

HTML

HTML 5

CSS 2.1

CSS 3

Reference

HTML <colgroup> Element

The <colgroup> element is used to group together columns in an HTML table to illustrate a structural relationship between the grouped colums unlike the <col /> element which is used to apply styles to a particular column or columns without any structural implications.
As with the <col /> element <colgroup> can only be used within an HTML table and enables you to apply attributes to columns instead of having to go through individual <td> elements in multiple rows to achieve the effect you want.

Attributes

  • CORE AND LANGUAGE ATTRIBUTES - class, id, title, style, dir, lang

  • MOUSE AND KEYBOARD EVENT ATTRIBUTES - onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmouseout, onmousemove, onkeydown, onkeyup, onkeypress

  • span* - has a number value which specifies the number of columns to which the <colgroup> element applies.
  • width - specifies a default width for each column contained by the <colgroup> element.
  • align* - specifies the alignment of content in a cell, values can be left, center, right, justify, char.
  • valign* - specifies the vertical alignment of data in a cell. Values can be top, middle, bottom, baseline.
  • char* - sets a single character in a line of text to act as the axis from which alignment takes place.
  • charoff* - sets the offset from the first instance of the alignment character in each line of text.

* NOTE: char and charoff are not supported by any of the major browsers and support for align, valign and span is variable.

HTML 4 Element List