HTML and CSS Reference
In-Depth Information
Explorer through table extensions, help you turn the tables and think in
columns.
Unlike the sectioning tags described in the previous sections, which are
interspersed with the rows of a table to define headers, footers, and sec-
tions within the table, the column-related tags cannot be intermingled
with the content of a table. You must place them at the very beginning
of a table, before the content. They define the model by which HTML
4/XHTML-compliant browsers render the columns.
10.3.7. The <colgroup> Tag
The <colgroup> tag defines a column group. You can use the <colgroup>
tag in two ways: as a single definition of several identical columns, or
as a container for several dissimilar columns. You can put one or more
<colgroup> tags within a <table> tag. The ending </colgroup> tag is rarely
used in HTML but is required in XHTML. In HTML, the <colgroup> ends at
the next <colgroup>, <thead>, <tbody>, <tfoot> , or <tr> tag.
All the currently popular browsers support <colgroup> and its attributes.
10.3.7.1. The span attribute
Use the span attribute with the <colgroup> tag to achieve the first type of
column grouping. The value of the span attribute is the integer number
of columns affected by the <colgroup> tag. For example, a table with six
columnsfour in the first group and two in the otherwould appear in the
source code as:
<colgroup span="4">
<colgroup span="2">
When the HTML 4/XHTML-compliant browser collects the table cells into
columns by the example definition, it groups the first four cells in each
 
Search WWH ::




Custom Search