6.表格
(1)标签:
· caption标签:是表的说明
· colgroup标签:是组合列,必须放在caption之后,thead之前
· tr标签--行、th--标题、td--单元格
(2)属性:
· cellpadding属性--内边距、cellspacing属性--外边距
· colspan属性--合并列、rowspan属性--合并行
· border-collapse是否把表格边框合并为单一的边框。(separate默认值,collapse合并)
· border-spacing分割单元格边框的距离
· caption-side设置表格标题的位置。(top默认值,bottom在表格下方)
· empty-cells是否显示表格中的空单元格。(show默认,hide不显示)
· table-layout设置显示宽度是否随内容拉伸。(auto默认,fixed不拉伸)
<table border="1px" cellspacing="0" style="background: #f0e68c; color: black"> <caption>特殊符号的使用</caption> <colgroup style="width: 100px"></colgroup> <colgroup style="width: 200px; background: #ee7600"></colgroup> <colgroup style="width: 200px; background: #ee7600"></colgroup> <colgroup style="width: 100px"></colgroup> <thead style="background: #104e8b"> <tr> <th>特殊字符</th> <th>编码</th> <th>编号</th> <th>描述</th> </tr> </thead> <tbody align="center"> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> </tbody> <tfoot style="background: gray"> <tr> <td colspan="4">其他特殊字符可网上搜索,知道常用即可···</td> </tr> </tfoot> </table>
转载请注明原文链接:https://www.cnblogs.com/chenJieLing/