last modified 23rd/Oct. 2000
表の全体は TABLE 要素で表します。この要素はブロック要素です。
<table> ...the rest of the table... </table>
TABLE 要素の文書型定義
<!ELEMENT TABLE - - (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)> <!ATTLIST TABLE -- table element -- %attrs; -- %coreattrs, %i18n, %events -- summary %Text; #IMPLIED -- purpose/structure for speech output-- width %Length; #IMPLIED -- table width -- border %Pixels; #IMPLIED -- controls frame width around table -- frame %TFrame; #IMPLIED -- which parts of frame to render -- rules %TRules; #IMPLIED -- rulings between rows and cols -- cellspacing %Length; #IMPLIED -- spacing between cells -- cellpadding %Length; #IMPLIED -- spacing within cells -- align %TAlign; #IMPLIED -- table position relative to window -- bgcolor %Color; #IMPLIED -- background color for cells -- %reserved; -- reserved for possible future use -- datapagesize CDATA #IMPLIED -- reserved for possible future use -- >
開始タグ、終了タグは何れも必須です。
TABLE 要素は最低限度一つ以上の TBODY 要素を持たなければなりません。
left
: 表は文書の左側に配置(フロート)center
: 表は文書の中央に配置right
: 表は文書の右側に配置(フロート)<table summary="物理定数表。第ゼロ列は物理定数名、第一列がその値、第二列はその物理定数が現れる式。"> ... </table>
width 属性に関しては、「表の幅を指定」を参照ください。
非推奨属性である align 属性に付いては、「浮動要素」を参照ください。
%attrs; に含まれている dir 属性は、一般には言語の種類によるテキスト方向を指定するもので、可能な値は LTR, RTL
の二種類です。
TABLE 要素に指定した場合は、その「こま割り」にも影響します。
LTR
... 初期値。第 0 列は左端、第一列はその右で、最終列は右端。セル内のテキストは左から右に読むように表示。RTL
... 第 0 列は右端で、最終列は左端。セル内のテキストは右から左に読むように表示。<table dir="RTL" lang="ja"> ... </table>