html表格教程
2022年5月25日小于 1 分钟约 160 字
查看以下示例:
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>用户注册</title>
</head>
<style>
th, td { border: 1px solid; }
</style>
<body>
<table>
<caption>表格标题</caption>
<tr>
<th></th>
<th>header1</th>
<th>header2</th>
<th>header3</th>
</tr>
<tr>
<th>header1</th>
<td>row1,data1</td>
<td>row1,data2</td>
<td>row1,data3</td>
</tr>
<tr>
<th>header2</th>
<td>row2,data1</td>
<td>row2,data2</td>
<td>row2,data3</td>
</tr>
<tr>
<th>header3</th>
<td rowspan="2">row3-4,data1</td>
<td colspan="2">row3,data2-3</td>
<!--<td>该位置被合并</td>-->
</tr>
<tr>
<th>header4</th>
<!--<td>该位置被合并</td>-->
<td>row4,data2</td>
<td>row4,data3</td>
</tr>
</table>
</body>
</html>