This article will explain to you what are the table nesting rules in What are the rules for table nesting in HTML5? Let’s look at the specific content below.
Let’s look at a piece of code for table nesting in What are the rules for table nesting in HTML5:
<table id="parent-table"> <tr> <td>parent-cell0</td> <td>parent-cell1 <table id="child-table"> <tr> <td>nest-cell</td> </tr> </table><!-- End #child-table --> </td> </tr> </table><!-- End #parent-table -->
According to W3C we can know that table nesting is allowed in What are the rules for table nesting in HTML5 , the content model of td is "process content"
The table is "process content", the context in which this element can be used is "the place where process content is expected"
What is Nested?
Nesting is known as creating hierarchical relationships within an element in the form of parent and child elements.
Such a parent element contains child elements such as
and . HTML stipulates the rule that will not become a child element.In this case, it is OK to create subtables within the table.
The above is the conceptual explanation of HTML table nesting rules.
The above is the detailed content of What are the rules for table nesting in HTML5. For more information, please follow other related articles on the PHP Chinese website!