表格的單元格和單元格之間,可以設定一定的距離,這樣可以使表格顯得不會過于緊湊。
基本語法
<table cellspacing=value>
語法解釋
單元格的間距以像素為單位。
文件范例:10-9.htm
設定表格的單元格間距。
01 <!-- ------------------------------ -->
02 <!-- 文件范例:10-9.htm -->
03 <!-- 文件說明:設定表格的單元格間距 -->
04 <!-- ------------------------------ -->
05 <html>
06 <head>
07 <title>設定表格的單元格間距</title>
08 </head>
09 <body>
10 <h1>主流的網頁設計軟件</h1>
11 <table border=3 width=400 height=100 bordercolor=#336699 background=10-8.jpg cellspacing=10>
12 <tr>
13 <td>網頁圖像軟件</td><td>fireworks</td>
14 </tr>
15 <tr>
16 <td>網頁制作軟件</td><td>dreamweaver</td>
17 </tr>
18 <tr>
19 <td>網頁動畫軟件</td><td>flash</td>
20 </tr>
21 </table>
22 </body>
23 </html>
文件說明
第11行定義了表格的單元格間距為10像素。
新聞熱點
疑難解答