Name
colgroup — <colgroup> . . . </colgroup>
Defines a conceptual group of columns that form a structural
division within a table. A table may include more than one column
group. The number of columns in a group is specified either by the
value of the span
attribute or
by a tally of columns (col
)
within the group. Column groups may be useful in speeding table
display (for example, the columns can be displayed incrementally
without waiting for the entire contents of the table) and provide
a system for display on nonvisual display agents such as speech-
and Braille-based browsers. The colgroup
element must appear before any
row (tr
) or rowgroup (thead
, tbody
, tfoot
) elements with the table
element.
Attributes
Same attributes as col
element
Example
<table><colgroup id="employinfo">
<col span="2" width="100" /> <col span="1" width="50" class="date" /></colgroup>
<thead> . . . (markup continues
)
Get HTML and XHTML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.