Some differences and notes between html and xhtml are as follows:

Source: Internet
Author: User

Some differences and notes between html and xhtml are as follows:
XHTML, HTML

There are not many differences between XHTML and HTML 4.01 standards,XHTML1.0YesXMLStyleHTML4.01The label specification is more strict. W3C has always promoted the strict type of syntax like XHTML,XHTMLSlave1.0Upgraded1.1Then it will die.

 

Major differences between html and xhtml:
  • XHTML elements must be correctly nested.
      • Error: <Head> </Head> <Body> </Body>
      • Correct:

  • The XHTML element must be disabled.
      • Error: <p> xxxx
      • Correct: <p> xxxx </p>
  • The tag name must contain lowercase letters.
      • Error: <Div> </diV>
      • Correct: <div> </div>
  • The XHTML document must have the root element.
Others

Target = "_ blank" is not allowed"
The target attribute is completely forbidden from XHTML 1.1. If you want to enable the function of opening a new window, you must rewrite it to rel = "external" and use JavaScript to achieve this effect.
Error: <a href = "http://blog.mukispace.com" target = "_ blank"> MUKI space </a>
Correct: <a href = "http://blog.mukispace.com" rel = "external"> MUKI space </a>

 

How can I verify whether your HTML or XHTML is valid?

    1:Directly copy the code to w3.org for online testing: http://validator.w3.org/check;

    2:You can also directly change html to the end of xhtml and then open it in the firefox browser;

HTML and HTML5

  HTML5ComparedHTML4More loose, no longer based on SGML, a lot moreSemantic HTMLTags, as well as audio, video, and document declarations, are simpler. A new string-encoded meta is added,DeleteSome html tags (font, frameset) in the 1990s s ....

Broadly speakingHTML5It brings us a higher version of CSS, that is, CSS2.0 is upgraded to CSS3.0, and Javascript also providesMore APIsSupported (canvas, postMessage, notify, worker) to make the WEB more accessible;

 

HTML 4.01 Reference Manual

HTML5

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.