O'Reilly logo

Dynamic HTML: The Definitive Reference by Danny Goodman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

<COL> — NN n/a IE 3 HTML 4

Synopsis

<COL>

End Tag: Forbidden

The COL element provides shortcuts to assigning widths and other characteristics (styles) to one or more subsets of columns within a table or within a table’s column group. With this information appearing early in the TABLE element, a browser equipped to do so starts rendering the table before all source code for the table has loaded (at which time it would otherwise perform all of its geographical calculations).

You can use the COL element in combination with the COLGROUP element or by itself. The structure depends on how you need to assign widths and styles to individual columns or contiguous columns. A COL element can apply to a single column by omitting the REPEAT (or SPAN in IE 4) attribute. By assigning an integer value to the REPEAT attribute, you direct the browser to ply the COL element’s width or style settings to said number of contiguous columns. The REPEAT element is similar to the COLGROUP element’s COLSPAN attribute. In concert with the COLGROUP element, the COL element allows you to create a kind of subset of related columns within a COLGROUP set.

No matter how you address the column structure of your table, the total number of columns defined in all COL and COLGROUP elements should equal the physical number of columns you intend for the table. If there should be more cells in a row than columns defined in COL and COLGROUP, the browser probably has to reflow the table and discard whatever incremental ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required