index1.html
<head>
<head>
<meta name="author" content="text/html;charset=utf-8" />
<title>表格</title>
<style>
body{font-family: 楷体;font-size: 15px;}
.collapse{
/*设置单元格的边是合并(collapse)还是独立(separate)*/
border-collapse:collapse;
}
.spacing {
/*行和单元格的边框在横向和纵向上的间距*/
border-spacing:5px 5px;
}
</style>
</head>
<body>
<table border="2" align="center" class="collapse">
<tr>
<th>目录</th>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
</tr>
<tr>
<td>01</td>
<td>发卡</td>
<td>女</td>
<td>20</td>
</tr>
<tr>
<td>02</td>
<td>钱一</td>
<td>男</td>
<td>25</td>
</tr>
</table>
<table border="2" align="center" class="spacing">
<tr>
<th>目录</th>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
</tr>
<tr>
<td>01</td>
<td>发卡</td>
<td>女</td>
<td>20</td>
</tr>
<tr>
<td>02</td>
<td>钱一</td>
<td>男</td>
<td>25</td>
</tr>
</table>
</body>
</html>
index2.html
<head>
<head>
<meta name="author" content="text/html;charset=utf-8" />
<title>表格</title>
<style>
body{font-family: 楷体;font-size: 15px;}
.collapse{
/*设置单元格的边是合并(collapse)还是独立(separate)*/
border-collapse:collapse;
}
.spacing {
/*行和单元格的边框在横向和纵向上的间距*/
border-spacing:5px 5px;
}
</style>
</head>
<body>
<table border="2" align="center" class="collapse">
<tr>
<th>目录</th>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
</tr>
<tr>
<td>01</td>
<td>发卡</td>
<td>女</td>
<td>20</td>
</tr>
<tr>
<td>02</td>
<td>钱一</td>
<td>男</td>
<td>25</td>
</tr>
</table>
<table border="2" align="center" class="spacing">
<tr>
<th>目录</th>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
</tr>
<tr>
<td>01</td>
<td>发卡</td>
<td>女</td>
<td>20</td>
</tr>
<tr>
<td>02</td>
<td>钱一</td>
<td>男</td>
<td>25</td>
</tr>
</table>
</body>
</html>