Connected: An Internet Encyclopedia
4.8. The COL Element
Up:
Connected: An Internet Encyclopedia
Up:
Requests For Comments
Up:
RFC 1942
Up:
4. A walk through the Table DTD
Prev: 4.7. The COLGROUP Element
Next: 4.9. Table Head, Foot and Body Elements
4.8. The COL Element
4.8. The COL Element
<!ELEMENT col - O EMPTY>
<!ATTLIST col -- column groups and --
-- properties --
%attrs; -- id, lang, dir and class --
span NUMBER 1 -- number of columns spanned --
-- by group --
width CDATA #IMPLIED -- column width specification --
%cell.halign; -- horizontal alignment in --
-- cells --
%cell.valign; -- vertical alignment in cells --
>
This optional element is used to specify column based defaults for
table properties. It is an empty element, and as such has no
content, and shouldn't be given an end tag. Several COL elements may
be given in succession. COL attributes override those of the parent
COLGROUP element.
- ID, CLASS, LANG and DIR
-
See earlier description of common attributes.
- SPAN
-
A positive integer value that specifies how many columns this
element applies to, defaulting to one. In the absence of SPAN
attributes the first COL element applies to the first column,
the second COL element to the second column and so on. If the
second COL element had SPAN=2, it would apply to the second and
third column. The next COL element would then apply to the
fourth column and so on. SPAN=0 has a special significance and
implies that the COL element spans all columns from the current
column up to and including the last column. Note that a COL SPAN
does not define a group. It is merely a way to share attribute
definitions.
- WIDTH
-
Specifies the width of the columns, see standard units. If the
element spans several columns then the WIDTH attribute specifies
the width for each of the individual columns - not the width of
the span. In addition, the "*" suffix denotes relative widths,
e.g.
width=64 width in screen pixels
width=0.5* a relative width of 0.5
Relative widths act as constraints on the relative widths of
different columns. If a COL element specifies a relative width
of zero, the column should always be set to its minimum width.
When widths are given in absolute units, the user agent can use
these to constrain the width of the table. The "*" suffix is
used to simplify importing tables from the CALS representation.
- ALIGN, CHAR, CHAROFF and VALIGN
-
Specify values for horizontal and vertical alignment within
table cells. See inheritance order of alignment properties.
Next: 4.9. Table Head, Foot and Body Elements
Connected: An Internet Encyclopedia
4.8. The COL Element