Name
<col> — NN: 2, 3, 4 • MSIE: 2, 3, 4, 5 • HTML 4 • WebTV • Opera3
Synopsis
<col>
Used within the <table> tag, this tag
specifies properties for a column (or columns) within a column group
(<colgroup>). Also, columns can share
attributes (such as text alignment) even if they are not part of a
formal structural grouping.
Column groups and columns were introduced by Internet Explorer 3.0 and are now proposed by the HTML 4.0 Specification as a standard way to label table structure. They may also be useful in speeding the table display (i.e., the columns can be displayed incrementally without waiting for the entire contents of the table).
Attributes
align=left|right|center|charSpecifies alignment of text in the cells of a column.
char=characterSpecifies a character along which the cell contents will be aligned. The default character is a decimal point (language-appropriate).
charoff=lengthSpecifies the distance to the first alignment character (
char) on each line. If a line doesn’t use an alignment character, it should be horizontally shifted to end at the alignment position.span=numberSpecifies the number of columns “spanned” by the
<col>element (which shares its attributes with all the columns it spans).valign=top|middle|bottom|baselineSpecifies the vertical alignment of text in the cells of a column.
width=pixels,percentage,n*Specifies the width (in pixels, percentage, or relative) of each column spanned by the
<col>element. It overrides the width attribute of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access