建立表格
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>表格</title>
<style>
.tt{
border-left:1px solid black;
border-top:1px solid black;
/* align-items:center; */
}
.tt td, .tt th{
border-right:1px solid black;
border-bottom:1px solid black;
text-align:center;
}
.tt th{
background-color:goldenrod;
color:white;
}
</style>
</head>
<body>
<table width="200px" cellspacing="0" cellpadding="0" class="tt">
<tr style="border:1px solid black">
<th>姓名</th>
<th>性别</th>
<th>电话</th>
</tr>
<tr style="border:1px solid black">
<td>小王</td>
<td>女</td>
<td>110</td>
</tr>
<tr style="border:1px solid black">
<td>小明</td>
<td>男</td>
<td>120</td>
</tr>
</table>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/765bb86854a56ec58dfdf2494e8900d5.png)
合并单元格
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>合并单元格</title>
<style>
.tt{
border-left:1px solid black;
border-top:1px solid black;
}
.tt th, .tt td{
border-bottom:1px solid black;
border-right:1px solid black;
}
</style>
</head>
<body>
<table class="tt" cellpadding="0" cellspacing="0" width="400">
<thead>
<tr>
<th colspan="5" style="background-color:greenyellow">个人简介</th>
</tr>
</thead>
<tbody>
<tr>
<td>姓 名:</td>
<td width="120px"> </td>
<td>性 别:</td>
<td rowspan="4" width="120px"> </td>
</tr>
<tr>
<td>婚姻状况:</td>
<td width="120px"> </td>
<td>出生年月:</td>
</tr>
<tr>
<td>民 族:</td>
<td width="120px"> </td>
<td>政治面貌:</td>
</tr>
<tr>
<td>身 高:</td>
<td width="120px"> </td>
<td>学 历:</td>
</tr>
</tbody>
</table>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/d029a46fac488b413131337c4c4cc80c.png)