きれいな表を作る
ここでは<table>タグを使って表を作る方法を紹介します。ソースをコピーペーストして色々触ってみて下さい。
<table border="0" cellspacing="1" cellpadding="1" bgcolor="#000000">
<tr>
<th bgcolor="#3cb371" width="50px">テスト</th>
<th bgcolor="#ffffff" width="100px">テスト2</th>
<th bgcolor="#3cb371" width="200px">テスト3</th>
</tr>
<tr>
<td bgcolor="#ffffff" width="50px">1</td>
<td bgcolor="#3cb371" width="100px">2</td>
<td bgcolor="#ffffff" width="200px">3</td>
</tr>
</table>
*このような表が出来ます。
cellspacing |
枠線の太さを決定 |
cellpadding |
枠内の広さを決定 |
bgcolor |
枠線の色を決定 |
td bgcolor |
枠内の色を決定 |
td width |
枠の幅を決定 |