<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
table{
border: 1px solid #ccc;
border-collapse: collapse;/*合并无用的边框,有点像padding=0*/
}
tr th{
height: 200px;
border: 1px solid #ccc;
width: 100px;
}
tr td{
height: 200px;
border: 1px solid #ccc;
width: 100px;
}
</style>
</head>
<body>
<table>
<caption>this is the caption</caption>
<tr>
<th>TH1</th>
<th>TH2</th>
<th>TH3</th>
<th>TH4</th>
</tr>
<tr>
<td>TD1</td>
<td>TD2</td>
<td>TD3</td>
<td>TD4</td>
</tr>
<tr>
<td colspan="2">TD1</td>
<td>TD3</td>
<td>TD4</td>
</tr>
<tr>
<td rowspan="2">TD1</td>
<td>TD2</td>
<td>TD3</td>
<td>TD4</td>
</tr>
<tr>
<td>TD2</td>
<td>TD3</td>
<td>TD4</td>
</tr>
<tr>
<td>TD1</td>
<td>TD2</td>
<td>TD3</td>
<td>TD4</td>
</tr>
</table>
</body>
</html>
表格的制作
最新推荐文章于 2023-03-15 14:02:05 发布