Use XHTML1.0 strict where you need to pay special attention to the exchange of experience

Source: Internet
Author: User
Always use lowercase letters, let quotes accompany attributes: All elements and attribute names must be lowercase, and all attribute values must use double quotation marks.

Error:
That's right:

Close all elements: some elements in HTML are not necessary to be closed. When the next element starts, the previous element is automatically closed. This is not allowed in XHTML. All elements must be closed, even if there is no content (e.g.)

Error:
  • Item 1
    That's right:
  • Item 1


  • Error:

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    That's right:

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit.



    Error:

    That's right:


    Error:
    That's right:

    Properties cannot be reduced: in HTML, some attributes can be reduced. XHTML is not allowed to do so.

    Error:
    That's right:

    Do not use excluded elements: some elements and attributes are allowed in HTML 4.01 Transitional and XHTML 1.0 Transitional, and are not supported under XHTML 1.0 Strict (also in HTML 4.01 Strict). Like what , ALink, align, width, height (for some elements), and background.

    The span element is not allowed to be missing one of the following start tags "p", "H1", "H2", "H3", "H4", "H5", "H6", "div", "pre", "Address", "fieldset", "ins", "Del"

    form (the form element must exist in the container):


  • 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.