HTML and CSS Reference
In-Depth Information
behavior of the various parts of a table. The three basic parts of a table's
display are the table, a row, and a cell.
table : A block-level element that generates the outer structure of
a table
table-row : A row containing cells
table-cell : An element that represents a table cell
To account for the cases where an element's display property is set to
a table-related value but does not have the parent elements that typically
make up a complete table structure (table, table row, and table cell), the
missing elements may be created virtually. What follows is a sample of
the CSS2.1 rules for creating these anonymous boxes:
If the parent P of a “table-cell” box T is not a “table-row,” a box
corresponding to a “table-row” will be generated between P and T.
This box will span all consecutive “table-cell” sibling boxes of T.
Beyond these core three values, there are display values for all the various
pieces of a table such as table body, caption, and column groups. The fol-
lowing code illustrates the various table-related values and their context:
table { display: table; }
tr { display: table-row; }
thead { display: table-header-group; }
tbody { display: table-row-group; }
tfoot { display: table-footer-group; }
col { display: table-column; }
colgroup { display: table-column-group; }
td, th { display: table-cell; }
caption { display: table-caption; }
Search WWH ::

Custom Search