Home > Web Front-end > H5 Tutorial > What are the rules for table nesting in HTML5

What are the rules for table nesting in HTML5

不言
Release: 2018-11-28 16:57:52
Original
6069 people have browsed it

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.

What are the rules for table nesting in HTML5

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 -->
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template