格式化
标签 | 描述 | 例子 |
---|
<b> | 定义粗体文本 | 啦啦啦 |
<big> | 定义大号字 | 啦啦啦 |
<em> | 定义着重文字 | 啦啦啦 |
<i> | 定义斜体字 | 啦啦啦 |
<small> | 定义小号字 | 啦啦啦 |
<strong> | 定义加重语气 | 啦啦啦 |
<sub> | 定义下标字 | 啦啦啦啦 |
<sup> | 定义上标字 | 啦啦啦啦 |
<ins> | 定义插入字 | 啦啦啦 |
<del> | 定义删除字 | 啦啦啦 |
表格
表格 | 描述 |
---|
<table> | 定义表格 |
<caption> | 定义表格标题 |
<th> | 定义表格的表头 |
<tr> | 定义表格的行 |
<td> | 定义表格的单元 |
<thead> | 定义表格的页眉 |
<tbody> | 定义表格的主体 |
<tfoot> | 定义表格的页脚 |
<col> | 定义表格的列属性 |
<table border="1">
<caption>我是一个人</caption>
<colgroup>
<col style="background-color:yellow" />
<col style="background-color:green" />
<col style="background-color:red" />
</colgroup>
<thead>
<tr>
<th>属性</th>
<th>年龄</th>
<th>学历</th>
</tr>
</thead>
<tfoot>
<tr>
<td>单</td>
<td>单</td>
<td>单</td>
</tr>
</tfoot>
<tbody>
<tr>
<td>单</td>
<td>单</td>
<td>单</td>
</tr>
</tbody>
</table>
其中thead、tfoot、tbody标签可以在网页加载时一部分一部分加载,而不需要等全部加载完毕才可以显示表格,一般将tfoot放在tbody前面,以便显示表尾。