Address: http://www.w3schools.com/xhtml/xhtml_why.asp
Translation: Fan weixiao
XHTML is a combination of HTML and XML (Extensible Markup Language ).
XHTML is an organic combination of HTML and XML.
XHTML consists of all the elements in HTML 4.01 combined with the syntax of XML.
All elements in html4.01 are combined with XML syntax to form XHTML.
Why XHTML?
Why should we use XHTML?
We have reached a point where your pages on the WWW contain "bad" HTML.
Since the development of the Internet, there have been too many bad HTML pages.
The following HTML code will work fine if you view it in a browser, even if it does not follow the HTML rules:
The following htmlCodeDisplay in your browser, even if it does not comply with HTML standards.
<HTML>
<Head>
<Title> This is bad HTML </title>
<Body>
<H1> bad html
</Body>
XML is a markup language where everything has to be marked up correctly, which results in "well-formed" documents.
XML is a markup language, and each part must be correctly marked. The result must be a "well-formed" document.
XML was designed to describe data and HTML was designed to display data.
XML is designed to describe data, while HTML is designed to display data.
Today's market consists of different browser technologies, Some browsers run Internet on computers, and some browsers run Internet on mobile phones and hand helds. the last-mentioned do not have the resources or power to interpret a "bad" markup language.
There are many browser technologies on the market, some of which can run on computers, and some can run on mobile phones or handheld computers. The last thing to note is that they do not have enough resources or can interpret a "bad" markup language.
Therefore-by combining HTML and XML, and their strengths, we got a markup language that is useful now and in the future-XHTML.
Therefore, through the combination of HTML and XML, coupled with their respective strengths, we now and in the future have achieved this perfect Markup Language-XHTML
XHTML pages can be read by all XML enabled devices and while waiting for the rest of the world to upgrade to XML supported browsers, XHTML gives you the opportunity to write "well-formed" documents now, that work in all browsers and that are backward browser compatible !!!
When other browsers in the world have been upgraded to support XML, XHTML can be read by all devices that support xml. XHTML gives you the opportunity to write "well-formed" documents, these documents can be viewed in the left and right browsers and have good backward compatibility.
(For more information, see the source)