[1] [CODE(HTMLe)@en[[[table]]]] [[要素]]の [DFN[[CODE(HTMLa)@en[cols]] [[属性]]]]は、
[[表]]の[[行]]の数を表すものとして提案されていました。

* 代替

[2] [[表]]に含まれる[[列]]の数は [CODE(HTMLe)@en[[[td]]]] [[要素]]や [CODE(HTMLa)@en[[[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>
>
[PRE(SGML dtd code)[
cols    NUMBER   #IMPLIED  -- used for immediate display mode --
]PRE]

[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]] に含まれなかったのは
[CODE(HTMLa)@en[[[cols]]]] [[属性]]だけでした。