Table caption
1st col. & row2nd col. thead3rd col.4th col.5th col.
2nd rowthead hello234 6 8abcdabcd
5th rowtfootabc
3rd rowtbodyabc2 4 6abc
4th rowtbodyabab5 7
Column alignment
Row alignment
Table alignment


Note 1
Cell alignment

Rules





Note 3
Frame      
   



Table border
Cell border
Cellspacing
Caption position and alignment
Caption side
Alignment
Table direction
Row visibility
RowVisibleCollapse
1st row
2nd row
3rd row
4th row
5th row
Note 4
Rowgroups visibility
RowgroupVisibleCollapse
THead
TBody
TFoot

W3C CSS level 1,
Section 4 Formatting model
4.1.2 Horizontal formatting

"(...) if both 'margin-left' and 'margin-right' are 'auto', they will be set to equal values. This will center the element inside its parent."

W3C CSS level 2.1,
Section 10 Visual formatting model details
10.3.3 Block-level, non-replaced elements in normal flow

"If both 'margin-left' and 'margin-right' are 'auto', their used values are equal. This horizontally centers the element with respect to the edges of the containing block."

Note 3: Rules attribute values groups, cols, rows should only be rendered when in border-collapse: collapse model.
"In this model [border-collapse: separate model], (...) Rows, columns, row groups, and column groups cannot have borders (i.e., user agents must ignore the border properties for those elements). (...) In the collapsing border model, it is possible to specify borders that surround all or part of a cell, row, row group, column, and column group. Borders for HTML's 'rules' attribute can be specified this way."
CSS 2.1, Section 17.6.1 The separated borders model (border-collapse)

Note 4: there is a bug in Opera 11 involving logical versus document order of rows which will affect the working of this DHTML for the last 3 rows.

Incompatibilities and bugs in this page

Internet Explorer 6 and Internet Explorer 7 have many many bugs
Internet Explorer 6 and Internet Explorer 7 should NOT render rules="cols|rows|groups" when border-collapse is separate.
border collapse doesn't work when visibility: collapse is active (Bug 242997)
visibility: collapse causes incorrect overflow area to be reported (Bug 242998)
HTMLCollection of RefTable.rows[] sequential order should be according to the display (logical) order, not document order (bug 125284 in Opera's BTS)

Remaining to do:

Valid HTML 4.01! CSS compliant