Tbody, THEAD, tfoot in HTML DOM table tags (objects) are automatically generated by a small experience

Source: Internet
Author: User

A <table> object,

1. When the inside is not written with <tbody> tags, but contains one or more <tr> tags (or <tr></tr> or <td> or <td></td> or <th > or <th></th>),

The <table> object will have a layer of <tbody></tbody> by default. (If the thead tag is not written in it, it will not be generated by default thead.tfoot).

2. When there is no <tbody> tag inside, a <tr> tag (or <tr></tr> or <td> or <td></td> or <th> or <) th></th>), but there are </tr> or </td>,

<table> objects do not generate a layer of <tbody></tbody> by default.

3. When there is no <tbody> tag, there is no <tr> or <td> or <th> when there are text, spaces, or full-width characters, or other non-<tr>/<td>/<th> tags ,

<table> objects do not generate a layer of <tbody></tbody> by default.

4.a: When there is no <tr> in the inside, but there is a <td> or <td></td>,<table> object will generate a layer in the <td> outside <TR></TR >. This <th> the same (that is, there are <td> or <th> and it generates <tr>).

B: When there is no <td> in it, but there are <tr> or <tr></tr>,<table> objects will generate a layer of <td></td> in <tr>. This <th> is not established (that is, when there is <tr>,<th> will not be generated by default).

The above, B points, even if the TR or TD label does not contain any characters, etc. are set up.

Simple Summary :

There are <tr> or <td> or <th> there will be <tbody> if none, there will be no <tbody>;

There are <td> or <th> there will be <tr>, there will be <tr> <td> but will not be generated by default <th>;

Single end tag </tr>, </td>, </th>, no default generated;

<thead> and <tfoot> will not be generated by default.

Tbody, THEAD, tfoot in HTML DOM table tags (objects) are automatically generated by a small experience

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.