HTML tutorial: TBody explanation and usage

Source: Internet
Author: User

When writing html code, you may encounter the Tbody mark, which is used for tables. Each page has two parts: head and body. For complex pages, many tables are used for page layout, and the table structure is relatively complex. Therefore, the table is divided into three parts: the header, body, and footer. The three parts are marked by thead, tbody, and tfoot respectively.

Thead is used to place titles and other things.

Tbody data Ontology

Tfoot, and so on ......

The label uses its own meaning. This is their role. (Thead table Header

Tbody table body

Tfoot table feet)

TBody is used in a table to specify the table rows it contains as the main part of the table.

The TBody, THead, and TFoot form three blocks in the Table. THead indicates the Head of the table, and TFoot indicates the footer of the table. TBody indicates the body of the table.

For example:

Copy to ClipboardReference: [www.bkjia.com] <TABLE>
<THEAD>
<TR>
<TD>
This text is in the THEAD.
</TD>
</TR>
</THEAD>
<TBODY>
<TR>
<TD>
This text is in the TBODY.
</TD>
</TR>
</TBODY>
<TFOOT>
<TR>
<TD>
This text is in the table footer.
</TD>
</TR>
</TFOOT>
</TABLE>

The dom structure of the table is as follows:

Copy to ClipboardReference: [www.bkjia.com] <table>
<Thead>
<Tr>
<Td> header-bkjia.com </td>
</Tr>
</Thead>
<Tbody>
<Tr>
<Td> table body </td>
</Tr>
</Tbody>
<Tfoot>
<Tr>
<Td> table footer </td>
</Tr>
</Tfoot>
</Table>

If there is only one tbody, tbody is often not written, but this object still exists. alert can see the innerHTML of table.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.