What's the difference between html4,html5,xhtml?

Source: Internet
Author: User

In the early development of HTML, before the creation of the web, many standards were developed in the context of browser developers discussing each other, such as HTML 2.0, 3.2 until 4.0, 4.01, most of these standards are so-called retro-spec, that is, there are standards before implementation. In this case, the HTML standard is not very normative, the browser is also very tolerant of errors in the HTML page. This in turn has led to the HTML author writing a large number of HTML pages that contain errors. Today, 99% of pages on the Web are said to contain HTML errors.

The web was then aware of the problem and thought it was a fundamental issue for the Internet and should be addressed. In order to standardize the XHTML 1.0 standard for HTML,W3C binding XML, this standard does not add any new tags, but only follows the XML requirements to standardize the HTML and defines a new MIME type,application/xhtml+xml. The purpose of the web is to enforce a strong error check on this MIME type browser, and display an error message if the page has an HTML error. However, due to the large number of errors already in the existing Web pages, many developers refuse to use the new MIME type. After the XHTML 1.0 standard, an Appendix C was added to allow developers to write pages using XHTML syntax while using the old MIME type,application/html to distribute the pages. This old MIME type does not trigger a strong error check on the browser. That's what we're seeing today, and many websites claim to abide by the XHTML 1.0 standard, which simply says that the XHTML syntax is used in his page, but it's not guaranteed to be completely error-free. To verify that XHTML does not really work, you need to see what MIME type the Web server uses to distribute the page.


The Web site then canceled Appendix C in XHTML 1.1, where pages using the XHTML 1.1 standard must be distributed with a new MIME type. So this standard is not used by many people. This also happens in the unfinished XHTML 2.0, which requires a strong error check, so no one uses it. The XHTML story also tells us that sometimes it doesn't work to have standards before they come true.


With the lessons of XHTML, what working Group and the great-for-all have made backwards compatibility a very important principle when developing next-generation HTML standards, or HTML5. HTML5 does introduce many new features, but one of its most important features is that it does not break the existing Web page. You can change the first line of any existing page to <! DOCTYPE Html&gt, it becomes also a HTML5 page, and can still be displayed normally in the browser.

What's the difference between html4,html5,xhtml?

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.