在html中绘制表格使用table标签
tr表示行
td表示列
th表示表头,表头通常用于列名字。
下面是一个列子。
<html>
<head>
<title>Table in html</title>
</head>
<body>
<p>水平表头</p>
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
<th>Gender</th>
</tr>
<tr>
<td>zdd</td>
<td>30</td>
<td>male</td>
</tr>
</table>
<p>垂直表头</p>
<table border="1">
<tr>
<th>Name</th>
<td>autumn</td>
</tr>
<tr>
<th>Age</th>
<td>30</td>
</tr>
<tr>
<th>Gender</th>
<td>famale</td>
</tr>
</table>
</body>
</html>效果图
水平表头
| Name | Age | Gender |
| zdd | 30 | male |
垂直表头









