1.table:用于定义表格。we
<table>
<tr>
<th>姓名</th>
<th>年龄</th>
</tr>
<tr> #第二行
<td>Mavis</td>
<td>20</td>
<!--tr用于定义表格里面的行。th定义的是表头,会居中加粗。td是数据单元格-->
</table>
为表格添加边框使用css实现。
2.为表格添加标题 caption
<table>
<caption>信息表</caption>
<tr>
<th>姓名</th>
<th>年龄</th>
</tr>
<tr> #第二行
<td>Mavis</td>
<td>20</td>
<!--tr用于定义表格里面的行。th定义的是表头,会居中加粗。td是数据单元格-->
</table>