<<PREV | TOP | NEXT>>

TABLE 要素

last modified 23rd/Oct. 2000

  1. TABLE - 表
  2. TABLE 要素
  3. CAPTION 要素 - 表題
  4. 行グループ要素 - THEAD, TFOOT, TBODY 要素
  5. 列グループ要素 - COLGROUP, COL 要素
  6. TR 要素 - 行要素
  7. セル要素 - TH, TD 要素
    1. セルの結合
    2. セル内の文字列揃え
    3. CSS による文字列揃え - 'text-align', 'vertical-align'
  8. 表のボーダー表示
  9. 表の幅の指定

の全体は 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 要素を持たなければなりません。

属性の定義

summary = text [CS]
表の目的や構造の要約を、非視覚系メディア(音声、点字など)のブラウザ (user agents) のために提供する。
align = left|center|right [CI]
<table summary="物理定数表。第ゼロ列は物理定数名、第一列がその値、第二列はその物理定数が現れる式。">
...
</table>

width 属性に関しては、「表の幅を指定」を参照ください。

非推奨属性である align 属性に付いては、「浮動要素」を参照ください。

dir 属性

%attrs; に含まれている dir 属性は、一般には言語の種類によるテキスト方向を指定するもので、可能な値は LTR, RTL の二種類です。

TABLE 要素に指定した場合は、その「こま割り」にも影響します。

<table dir="RTL" lang="ja">
...
</table>

<<PREV | TOP | NEXT>>

FC2> モビット