What is the difference between XHTML and HTML?

Source: Internet
Author: User

      all labels must be lowercase
      In XHTML, all labels must be lowercase, not case-insensitive, and not all uppercase. Examples are as follows.
      Fatal error:Correct:The labels must be paired.
      such as <p>...</p>, <a>...</a>, <div>...</div> tags, etc., when a label appears, must have a corresponding end tag, indispensable, Just like the parentheses in any programming language.
      Error: Everyone good <p> is really good

      correct:<p> Everyone good </p><p> is really good </p>
      Summary:

    label order must be correctly labeled from outside to inside, layer by layer covered, so suppose you write div first write H1, end will write H1 after writing Div. Just remember a principle of "advanced out", first pop the label to the end.
    error:<div>
    correct:<div>
    all attributes must use double quotation marks
    in XHTML 1.0, a single quotation mark cannot be used, so you have to use double quotes throughout the process.
        error: <div style=font-size:11px>csdn</div>
    correct: <div style= "font-size:11px" >csdn</div
    5
    target= "_blank" is not allowed
    The target property is completely banned from XHTML1.1, and if you want to have the ability to open a new window, you must rewrite it to rel= "external" and work with JavaScript to achieve this effect.
        error: <a href= "http://blog.mukispace.com" target= "_blank" >csdn</a>
    correct: <a href= "http://blog.mukispace.com" rel= "external" >csdn</a>

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.