サイト内検索
...HTML・XHTMLタグ...
table・セル
セルの間隔
- セルの間隔は、table要素にcellspacing属性を指定します。
- [使い方]
- <table border="1" cellspacing="10">
cellspacing= | "" |
整数の「ピクセル数(例・・"1")」
または 「パーセント(例・・"50%")」を指定します。 |
---|
サンプル
《「cellspacing」の数値を「0」に指定した場合》 [bodyの中] <table border="1" cellspacing="0"><tr> <th>No1</th> <th>No2</th> </tr> <tr> <td>No3</td> <td>No4</td> </tr> </table> |
[ブラウザ上]
|
||||
《「cellspacing」の数値を「10」に指定した場合》 [bodyの中] <table border="1" cellspacing="10"><tr> <th>No1</th> <th>No2</th> </tr> <tr> <td>No3</td> <td>No4</td> </tr> </table> |
[ブラウザ上]
|