Re: The remaining issues list

Dave Raggett (
Wed, 22 Mar 95 10:34:02 EST

Paul Grosso writes:

> I'd point out that the SGML Open recommendations included several
> suggestions with respect to table models.
> That is, we recommend removal of the "colspec" and "units" attribute from
> table's attlist, and we recommend addition of a "colspec" element.

The latest version of the HTML 3.0 proposal attempts to satisfy many of
the concerns raised in the SGML Open recommendations. I have retained
the COLSPEC attribute after improvements (see below) as I feel this
much more concise, easier to read, and provides the same expressive power
as the sequence of <COLSPEC> elements suggested by the SGML Open team.

> We also point out the need to clarify various issues such as what
> should happen to the cells that are "spanned over" by a vertical
> or horizontal span.

This is spelt out in the spec, of which the DTD is but one part:

o Cells may be empty.

o Cells spanning rows contribute to the column count on each of the
spanned rows, but only appear in the markup once (in the first row

o If the column count for the table is greater than the number of cells
for a given row (after including cells for spanned rows), the missing
cells are treated as occurring on the right handside of the table, and
rendered as empty cells.

o The row count is determined by the TR elements - any rows implied by
cells spanning rows beyond this should be ignored.

o The user agent should be able to recover from a missing <TR> tag
prior to the first row as the TH and TC elements can only occur
within the TR element

The following is quoted from the full proposal at:

The TABLE element includes support for the attributes:

Specifies the choice of units for the COLSPEC attribute:

Specifies em units. This is the default setting and allows user agents
to render the table a row at a time without waiting until all of the
table's data has been received.
Used to set the relative width of columns. The user agent sums
the values to determine the proportional width of each column.
The least useful!

A design issue for user agents is how to handle cases where cell
contents won't fit into the specified column widths. One approach is to
clip the contents to the given column width, another is to resize the
columns to fit the contents regardless of the COLSPEC attribute (its
best to wait until all of the table's data has been processed before

The colspec attribute is a list of column widths and alignment
specifications. The columns are listed from left to right with a capital
letter followed by a number, e.g. COLSPEC="L20 C8 L40". The letter is L
for left, C for center, R for right alignment of cell contents. J is for
justification, when feasible, otherwise this is treated in the same way as
L for left alignment. D is for decimal alignment, see DP attribute.

Capital letters are required to avoid a particularly common error when a
lower case L is confused with a one. Column entries are delimited by one
or more space characters.

The number specifies the width in em's, pixels or as a fractional value of
the table width, as according to the associated units attribute. This
approach is more compact than used with most SGML table models and chosen
to simplify hand entry. The width attribute allows you to specify the
width of the table in pixels, em units or as a percentage of the space
between the current left and right margins.

This specifies the character to be used for the decimal point with the
COLSPEC attribute, e.g. dp="." (the default) or dp=",". The default may be
altered by the language context, as set by the LANG attribute on enclosing

-- Dave Raggett <> url =
Hewlett Packard Laboratories, Filton Road, | tel: +44 117 922 8046
Bristol BS12 6QZ, United Kingdom | fax: +44 117 922 8924