HOME > HTML辞典(テーブル) | ||||||||||
テーブルテーブルを作る(1)
<table>
<tr> <th>〜</th> <th>〜</th> </tr> <tr> <td>〜</td> <td>〜</td> </tr> </table> テーブル・・・<table>〜</table>
横1列分・・・<tr>〜</tr>
見出し用の1セル分・・・<th>〜</th>
1セル分・・・<td>〜</td>
テーブルを作る(2)
<table>
<thead> <tr> <th>〜</th> <th>〜</th> </tr> </thead> <tbody> <tr> <td>〜</td> <td>〜</td> </tr> </tbody> <tfoot> <tr> <th>〜</th> <th>〜</th> </tr> </tfoot> </table> ヘッダ部・・・<tbody>〜</tbody>
メイン部・・・<tbody>〜</tbody>
フッタ部・・・<tfoot>〜</tfoot>
テーブルの位置を設定する
<table align="位置">〜</table>
位置・・・left、right、center
セル内の余白を設定する
<table cellpadding="余白">〜</table>
余白・・・pxなど
セル間の余白を設定する
<table cellspacing="余白">〜</table>
余白・・・pxなど
テーブルのサイズを設定する
<table width="幅" height="高さ">〜</table>
セルのサイズを設定する
<td width="幅" height="高さ">〜</td>
枠線の幅を設定する
<table border="サイズ">〜</table>
枠線の色を設定する
<table border="サイズ" bordercolor="色">〜</table>
テーブルの背景色を設定する
<table bgcolor="色">〜</table>
セルの背景色を設定する
<tr bgcolor="色">〜</tr>
<td bgcolor="色">〜</td>
テーブルの背景画像を設定する
<table background="パス">〜</table>
セルの背景画像を設定する
<tr background="パス">〜</tr>
<td background="パス">〜</td>
セル内の改行を禁止する
<tr nowrap>〜</tr>
<td nowrap>〜</td>
セルを縦に連結する
<td rowspan="連結数">〜</td>
セルを横に連結する
<td colspan="連結数">〜</td>
|
HTML辞典
|