Analysis (X) nested rules under HTML Strict

Source: Internet
Author: User

Here is a label nesting rule that must be followed under HTML 4 Strict and XHTML 1.0 Strict, for example, you can't <a> embed a <a> convention like that inside.

  Description

    • For the convenience of readers, the labels in this article use uppercase (according to XHTML rules, element names must be lowercase, such as not)
    • Lowercase words indicate a group or series of HTML tags
    • Each entry (label) follows a list of labels and, if not, indicates that the entry (label) is not allowed to contain any labels inside. This means that the entry can contain only plain text content (#PCDATA, see below). If indicated (empty), this means that the entry is not allowed to contain any form of content. For Flow,inline,block,object and body, the content that is allowed to be contained inside is given separately in the text.
    • #PCDATA means "parsed character data", that is, plain text content (excluding any HTML tags, but escape content can exist, such as Ä and ä)
    • CDATA means "character data," meaning that the plain text content of the escaped content is not included, and the details can refer to CDATA confusion
    • Excluding ... means not directly or indirectly including the listed elements

  

  

Note 1. The above content is based on the Strict DTD for HTML 4.01 specification. Junchen translation from allowed nesting to elements in HTML 4 Strict (and XHTML 1.0 Strict)

Note 2. For XHTML 1.0, basically consistent, different points are as follows:

    • The <script> content for and <style> , in HTML 4, is CDATA while in XHTML it is #PCDATA
    • In XHTML, the <table> tag can be followed by one <tr> , but in HTML 4.01, this is not allowed, but <tbody> the label can be omitted. This means that if the code is <table> followed immediately <tr> , for HTML 4.01, a label will be generated implicitly <tbody> , but not in XHTML. This affects the style sheet used tbody as a selector.


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.