トップページ  > HTML Living Standard  > <tfoot>

★HTML Living Standard リファレンス

<tfoot> …… テーブルのフッターを表す
Internet Explorer Microsoft Edge Google Chrome Safari Firefox Opera
広告

<tfoot>タグは、テーブルのフッターを表す際に使用します。

table要素の子要素として配置されたtfoot要素は、 そのテーブルのフッター(列の要約)となる行ブロックを表します。

tfoot要素は、 table要素の子として、 caption要素colgroup要素thead要素tbody要素tr要素 の後に配置します。

終了タグ</tfoot>の省略について

親要素にそれ以上のコンテンツがない場合、終了タグ</tfoot>を省略できます。

■使用例

以下のサンプルは、ある企業の粗利益率を表にしたものです。 tfoot要素は、それぞれの縦列の要約として機能しています。

HTMLソース

<style>
 #arari {border-collapse: collapse; border: solid thick;}
 #arari thead, #arari tbody {border: solid medium;}
 #arari tfoot {border: double medium;}
 #arari th {border: solid thin; padding:4px; text-align: center; background-color:#cccc99;}
 #arari td {border: solid thin; padding:4px; text-align: right; background-color:#ffffff;}
 #arari tfoot td {background-color:#ffffcc; font-weight:bold;}
</style>

<table id="arari">
 <caption>粗利益率表</caption>
 <thead>
  <tr><th> </th><th>2008年</th><th>2007年</th><th>2006年</th></tr>
 </thead>
 <tbody>
  <tr><th>純売上高</th><td>$ 32,479</td><td>$ 24,006</td><td>$ 19,315</td></tr>
  <tr><th>売上原価</th><td>$ 21,334</td><td>$ 15,852</td><td>$ 13,717</td></tr>
 </tbody>
 <tbody>
  <tr><th>粗 利 益</th><td>$ 11,145</td><td>$  8,154</td><td>$  5,598</td></tr>
 </tbody>
 <tfoot>
  <tr><th>粗利益率</th><td>34.3%</td><td>34.0%</td><td>29.0%</td></tr>
 </tfoot>
</table>
↓↓↓

ブラウザ上の表示

粗利益率表
2008年2007年2006年
純売上高$ 32,479$ 24,006$ 19,315
売上原価$ 21,334$ 15,852$ 13,717
粗 利 益$ 11,145$ 8,154$ 5,598
粗利益率34.3%34.0%29.0%

■関連項目

  • <table> …… テーブル(表)を表す
  • <caption> …… テーブルのキャプションを表す
  • <colgroup> …… テーブル内の列グループを表す
  • <col> …… 列グループ内の列を表す
  • <tbody> …… テーブルのデータ本体を表す
  • <thead> …… テーブルのヘッダーを表す
  • <tfoot> …… テーブルのフッターを表す
  • <tr> …… テーブル内の行を表す
  • <td> …… テーブル内のデータセルを表す
  • <th> …… テーブル内のヘッダーセルを表す
広告
Sponsors
広告
MuuMuu Domain!
ドメイン取るならお名前.com
現役エンジニアのオンライン家庭教師【CodeCamp】
サイトに広告を掲載してお小遣いが稼げる!【A8.net】
Node.jsコース
はじめてのプログラミングコース
▲ページ先頭へ
HTMLクイックリファレンスについて
© HTMQ