使用thead、tfoot、 tbody制作一個表格

字號:


    還有人很變態(tài)地用這三個標(biāo)簽做出標(biāo)題能跟隨表格,或者tbody固定高度,走出自動出現(xiàn)滾動條的功能。
    代碼如下:
    <title>thead、tfoot 以及 tbody標(biāo)簽</title>
    <table border=1>
    <thead>
    <tr>
    <th>科目</th>
    <th>分數(shù)</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>語文</td>
    <td>99</td>
    </tr>
    <tr>
    <td>數(shù)學(xué)</td>
    <td>60</td>
    </tr>
    </tbody>
    <tfoot>
    <tr>
    <td>總分</td>
    <td>159</td>
    </tr>
    </tfoot>
    </table>