1. 程式人生 > 其它 >html--給表格table新增邊框

html--給表格table新增邊框

技術標籤:html

1、這樣似的
table border=“1”

![在這裡插入圖片描述](https://img-blog.csdnimg.cn/20201228144445900.png

<html>
<body>
<table border="1">
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
</table>
</body>
</html>

2、這樣似的
table border=“1” cellspacing=“0”

在這裡插入圖片描述

<html>
<body>
<table border="1" cellspacing="0">
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
</table>
</body>
</html>`