1、table标签中没有 tbody标签,浏览器会自动加上去的
2、一般表格的布局可以不使用 thead、tfoot 以及 tbody 元素。这样浏览器解析时会自动给一个 tbody标签的。
完整的table表格:
<table border="1"> <thead> <tr> <th>Month</th> <th>Savings</th> </tr> </thead> <tfoot> <tr> <td>Sum</td> <td>$180</td> </tr> </tfoot> <tbody> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </tbody> </table>
常用简单的表格(浏览器解析会自动在table内加一个tbody标签):
<table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table>