Home  >  Article  >  Web Front-end  >  thead, tfoot, tbody create a table

thead, tfoot, tbody create a table

高洛峰
高洛峰Original
2017-03-02 14:50:481598browse

thead, tfoot and tbody tags implement a table example. These three tags represent the head (th), theme, and bottom of the table respectively. They can make the table more semantic and allow us to control it more conveniently. table performance Some people are very perverted and use these three tags to make the title follow the table, or the tbody has a fixed height, and the scroll bar automatically appears.

The code is as follows:

<title>thead、tfoot 以及 tbody标签</title>
    <table border="1">
        <thead>
            <tr>
            <th>科目</th>
            <th>分数</th> 
            </tr>
        </thead>
        <tbody>
            <tr>
            <td>语文</td>
            <td>99</td>
            </tr>
            <tr>
            <td>数学</td>
            <td>60</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
            <td>总分</td>
            <td>159</td>
            </tr>
        </tfoot>
    </table>


For more articles related to thead, tfoot, tbody making a form, please pay attention to the PHP Chinese website!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn