Html中的table包括 caption、col、colgroup、thead、tfoot 以及 tbody
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> HTML <table> 标签 定义和用法 <table> 标签定义 HTML 表格。 简单的 HTML 表格由 table 元素以及一个或多个 tr、th 或 td 元素组成。 tr 元素定义表格行,th 元素定义表头,td 元素定义表格单元。 更复杂的 HTML 表格也可能包括 caption、col、colgroup、thead、tfoot 以及 tbody 元素。 其实就使用来说table,tr,td。就够了。正规点加个表头,就是table, tr,th,td。如果包含标题,就在用上caption 第二种就是table,thead,tbody,tfoot,tr ,th,td一起来使用,对表进行分组。 再复杂些就的使用col,colgroup了。 HTML <col> 标签 定义和用法 <col> 标签为表格中一个或多个列定义属性值。 如需对全部列应用样式,<col> 标签很有用,这样就不需要对各个单元和各行重复应用样式了。 您只能在 table 或 colgroup 元素中使用 <col> 标签。 实例 col 元素为表格中的三个列规定了不同的对齐方式: <table width="100%" border="1"> <col align="left" /> <col align="left" />