w3c icon + 2.0 3.0 3.2? 4.0
Netscape icon 1.0 2.0 3.0 4.0  
MSIE icon 1.0 2.0 3.0 4.0  
Mosaic icon 1.0 2.0      
Opera 1.0 2.1      
WebTV 0.9 1.2      

<colgroup>

container
CSS: in-line element
start tagrequired
end tagoptional
Sandia Reference

Link to Site Map

The <colgroup> tag provides a means of grouping table columns together. When an attribute is established using the <colgroup> tag, all columns in that <colgroup> take on that characteristic.

HTML 4.0 specifies that all tables must contain at least one column group. If a column group is not defined (using <colgroup>), the default condition is that one column group exists, albeit not named.

The <colgroup> tag itself does not directly influence, nor identify columns. The <col> tag does that. Neither should be made to work without the other.

The syntax would be as follows:

<table>
<colgroup widsth="2*">
<col>
<col>
<colgroup width="10%">
<col>
<col>
<tr><td></td><td></td><td></td><td></td>
<tr><td></td><td></td><td></td><td></td>
<tr><td></td><td></td><td></td><td></td>
</table>

The table below is used throughout this page as a basis for examples. It is shown in its default state. To view the syntax used, please view the source in your browser. Each attribute and argument is identified by a comment in the form "<!-- attribute= -->".

Communities of Metropolitan Ottawa
City population area Province Language
Ottawa 300,000 120 sq.mi. Ontario many
Kanata 100,000 80 sq.mi. Ontario English
Nepean 30,000 45 sq.mi. Ontario English
Gloucester 30,000 65 sq.mi. Ontario English & French
Orleans 25,000 35 sq.mi. Ontario English & French
Rockcliff 5,000 5 sq.mi. Ontario many
Vanier 15,000 3 sq.mi. Ontario Fremch
Hull 25,000 35 sq.mi. Québec French
Aylmer 35,000 55 sq.mi. Québec many
Gatineau 25,000 45 sq.mi. Québec French
Totals 590,000 488 sq.mi.

align=
w3c icon + 2.0 3.0 3.2 4.0?
The "align=" attribute controlls the horizontal alignment of data in a cell.
Communities of Metropolitan Ottawa
City population area Province Language
Ottawa 300,000 120 sq.mi. Ontario many
Kanata 100,000 80 sq.mi. Ontario English
Nepean 30,000 45 sq.mi. Ontario English
Gloucester 30,000 65 sq.mi. Ontario English & French
Orleans 25,000 35 sq.mi. Ontario English & French
Rockcliff 5,000 5 sq.mi. Ontario many
Vanier 15,000 3 sq.mi. Ontario Fremch
Hull 25,000 35 sq.mi. Québec French
Aylmer 35,000 55 sq.mi. Québec many
Gatineau 25,000 45 sq.mi. Québec French
Totals 590,000 488 sq.mi.
"left" quad left
"right" quad right
"center" quad center
"justify" justified
"char" aligned over a specific character defined by "char=" (see below)
cellhalign=
w3c icon + 2.0 3.0 3.2 4.0
Provides control of the horizontal alignment of data in the cells. This is an identical condition to "align=", above, so the purpose of this attribute is not certain.
Communities of Metropolitan Ottawa
City population area Province Language
Ottawa 300,000 120 sq.mi. Ontario many
Kanata 100,000 80 sq.mi. Ontario English
Nepean 30,000 45 sq.mi. Ontario English
Gloucester 30,000 65 sq.mi. Ontario English & French
Orleans 25,000 35 sq.mi. Ontario English & French
Rockcliff 5,000 5 sq.mi. Ontario many
Vanier 15,000 3 sq.mi. Ontario Fremch
Hull 25,000 35 sq.mi. Québec French
Aylmer 35,000 55 sq.mi. Québec many
Gatineau 25,000 45 sq.mi. Québec French
Totals 590,000 488 sq.mi.
"left" This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
"center" This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
"right" This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
cellvalign=
w3c icon + 2.0 3.0 3.2 4.0
Controls the vertical alignment of data in the cell. This is an identical condition to "valign=" below, so the purpose of this attribute is unclear, given the lack of arguments in the specification.
"bottom" This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
"middle" This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
"top" This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
char=
w3c icon + 2.0 3.0 3.2 4.0
The "char=" attribute takes a character that specifies the alignment of subsequent text. This is usually used when displaying monetary values. This defaults to the decimal point for the current language. The argument is case sensitive.
charoff=
w3c icon + 2.0 3.0 3.2 4.0
"CHAROFF is a decimal number that specifies the offset for the alignment character from the beginning of the table cell in the DIR direction. Units may be specified using the standard defined units suffixes plus the special suffix of the percent sign indicating the percentage of offset within the cell from the beginning of the cell." (Sandia)

The HTML 4.0 explanation is equally convoluted and since it is unlikely to be supported by most browsers, 'enuf said.

"## en" set offset to ## nutts (en spaces - an en space is approximately 1/2 the space of the capital M)
"### pixels" set offset to ### pixels
"##%" sets offset to ##% of the cell width
class=
w3c icon + 2.0 3.0 3.2 4.0
dir=
w3c icon + 2.0 3.0 3.2 4.0
"ltr"
"rtl"
halign=
WebTV 0.9 1.2      
defines the alignment of the text within the table cell
"center"
"left"
"right"
id=
w3c icon + 2.0 3.0 3.2 4.0
lang=
w3c icon + 2.0 3.0 3.2 4.0
span=
w3c icon + 2.0 3.0 3.2 4.0
WebTV 0.9 1.2      
The "span=" attribute "specifies the default number of columns in this group". Note: when "span=" is defined and there is at least one <col> element in the group, the "span=" attribute is ignored. All that hard work understanding this mumbo jumbo and you just found out you don't need to know it. Well, maybe in the future? Will that help?
Communities of Metropolitan Ottawa
City population area Province Language
Ottawa 300,000 120 sq.mi. Ontario many
Kanata 100,000 80 sq.mi. Ontario English
Nepean 30,000 45 sq.mi. Ontario English
Gloucester 30,000 65 sq.mi. Ontario English & French
Orleans 25,000 35 sq.mi. Ontario English & French
Rockcliff 5,000 5 sq.mi. Ontario many
Vanier 15,000 3 sq.mi. Ontario Fremch
Hull 25,000 35 sq.mi. Québec French
Aylmer 35,000 55 sq.mi. Québec many
Gatineau 25,000 45 sq.mi. Québec French
Totals 590,000 488 sq.mi.
style=
w3c icon + 2.0 3.0 3.2 4.0
A text string providing rendering information specific to this element in a notation independent of HTML. (W3)
title=
w3c icon + 2.0 3.0 3.2 4.0
valign=
w3c icon + 2.0 3.0 3.2 4.0
WebTV 0.9 1.2      
defines the alignment of the text within the table cell
"top"
"middle"
"bottom"
"baseline"
width=
w3c icon + 2.0 3.0 3.2 4.0
WebTV 0.9 1.2      
The "width=" attribute specifies a default width for each column in the group. There are two philosophies in specifying width, relative and absolute. One column may be fixed and the next can be relative.

The default unit is pixels. A previous specification allowed a suffix on the number with no suffix meaning "pixels" and being the default condition.

Communities of Metropolitan Ottawa
City population area Province Language
Ottawa 300,000 120 sq.mi. Ontario many
Kanata 100,000 80 sq.mi. Ontario English
Nepean 30,000 45 sq.mi. Ontario English
Gloucester 30,000 65 sq.mi. Ontario English & French
Orleans 25,000 35 sq.mi. Ontario English & French
Rockcliff 5,000 5 sq.mi. Ontario many
Vanier 15,000 3 sq.mi. Ontario Fremch
Hull 25,000 35 sq.mi. Québec French
Aylmer 35,000 55 sq.mi. Québec many
Gatineau 25,000 45 sq.mi. Québec French
Totals 590,000 488 sq.mi.
"n%" This is not listed in the HTML 4.0 arguments list. However, it appears to work. (MSIE 4.0 b 4.71.0544.1)
"n*" This is the relative argument. "*" means "variable". If a table in a canvas (the width of a working window) is divided into columns, one can be "2*" (two times) larger than another that carries no relative value or a fixed value (in pixels). If there is no number with the "*", the default is "1" (one).
"ncm" suffix meaing centimeters
"nem" suffix meaning "em"s, the width of the capital letter "M"
"nin" suffix meaning inches
"nmm" suffix meaning millimeters
"npi" A pica is a typesetting unit of measure: there are six pica to the inch and twelve points to one pica.
"npt" this is a typesetting unit of measure: 1 point is 1/72nd of an inch (one seventy-second of an inch.)
"n(px)"
default
This is supposed to mean pixel. However, it is seldom used simply because a numeric value without a suffix invariably referrs to pixels.