, tags. They represent the header, body and foot of the table respectively. When printing web content, if the table is too large to be printed on one page, and will appear on every page (note: invalid in IE, but valid in Firefox).
Features of tbody:
In order to allow a large table to be displayed in segments when downloaded, that is to say, when the browser parses HTML, the table is interpreted as a whole. Display can be optimized using tbody. If the table is very long, use tbody segmentation to display it part by part without waiting for the entire table to be downloaded. Download one piece and display one piece. It has better effect when the table is huge. The content of the rows contained in tbody will be displayed first after downloading, without waiting for the end of the table. In addition, there is one more thing that needs to be noted. Table rows are originally displayed from top to bottom. However, after applying thead/tbody/tfoot, it will be displayed "from head to toe", regardless of the order of your lines of code. That is to say, if thead is written after tbody, when the html is displayed, it will still be displayed first and then tbody.
三个注意点:
Copy after login
There can only be one thead and tfoot in a table, but tbody can have multiple
tfoot must appear in front of tbody, so that the browser The footer of the table can be rendered before receiving the main data, which helps speed up the display of the table. This is especially important for large tables
The tr tag must be used in thead, tbody and tfoot
2.
When setting the align attribute of the caption to left, each browser displays different styles
firefox
chrome
IE6 7 8
IE9
safari
3.
When setting the align attribute of the caption to left, IE6 7 reflects this attribute, while other browsers are indifferent. The same goes for adding text-align to the tag style
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