表のタイトルやキャプションをつける

 

HTMLタグ

<caption>文字列</caption>

<caption align="位置">文字列</caption>

<caption align="横位置" valign="縦位置">文字列</caption>

 

使用例

 

<html>
<head>
<title>表のタイトルやキャプションをつける</title>
</head>
<body>


  <table align="center" border bordercolor="#000099">
  <caption align="top">表 2006 FIFA W杯 日本の対戦国</caption>  
  <tr><th>対戦順位</th><th>対戦国</th></tr>
     <tr>
    <td>1</td>
   <td>オーストラリア</td>
   </tr>
    <tr>
    <td>2</td>
    <td>クロアチア</td>
    </tr>
    <tr>
    <td>3</td>
   <td>ブラジル</td>
   </tr>
  </table><hr>

 <table border bordercolorlight="#00ff33" width="200" >
  <caption align="left" valign="bottom">
  備考:予選グループです。</caption>
  <tr><th>対戦順位</th><th>対戦国</th></tr>
  <tr>
    <td>1</td>
    <td>オーストラリア</td>
    </tr>
    <tr>
   <td>2</td>
   <td>クロアチア</td>
    </tr>
    <tr>
    <td>3</td>
  <td>ブラジル</td>
    </tr>
  </table>

</body>
</html>

参照

 

詳細説明


 

 

SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送