cols

table 要素 cols 属性 (HTML)

[1] table 要素cols 属性は、 の数を表すものとして提案されていました。

代替

[2] に含まれるの数は td 要素colspan 属性などから自動的に決定されます。著者が明示的に指定する必要はありません。

歴史

[3] この属性RFC 1942 には含まれていましたが、HTML4 までには削除されました。 主要な Webブラウザーでこの属性を実装したものはありませんでした。

RFC 1942 より

[4] <http://tools.ietf.org/html/rfc1942#page-3-6>

The remaining issue is the number of columns. Some people have suggested waiting until the first row of the table has been received, but this could take a long time if the cells have a lot of content. On the whole it makes more sense, when incremental display is desired, to get authors to explicitly specify the number of columns in the TABLE start tag.

Authors still need a way of informing the browser whether to use incremental display or to automatically size the table to match the cell contents. For the two pass auto sizing mode, the number of columns is determined by the first pass, while for the incremental mode, the number of columns needs to be stated up front. So it seems to that COLS=_nn_ would be better for this purpose than a LAYOUT attribute such as LAYOUT=FIXED or LAYOUT=AUTO.

[5] <http://tools.ietf.org/html/rfc1942#page-3-12>

cols    NUMBER   #IMPLIED  -- used for immediate display mode --

[6] <http://tools.ietf.org/html/rfc1942#page-3-13>

COLS
Specifies the number of columns for the table. If present the user agent may render the table dynamically as data is received from the network without waiting for the complete table to be received. If the WIDTH attribute is missing, a default of "100%" may be assumed for this purpose. If the COLS attribute is absent, a prepass through the table's contents is needed to determine the number of columns together with suitable values for the widths of each column.

[7] <http://tools.ietf.org/html/rfc1942#page-3-23>

Recommended Layout Algorithms
If the COLS attribute on the TABLE element specifies the number of columns, then the table may be rendered using a fixed layout, otherwise the autolayout algorithm described below should be used. (後略)

メモ

[8] RFC 1942 で定義された要素属性のうち HTML4 に含まれなかったのは cols 属性だけでした。