Beginners Web page writers should know the characteristics of HTML and XHTML

Source: Internet
Author: User
Tags format definition html tags version
xhtml| Beginners | Web page

1, what is XHTML?

HTML is a basic Web page design language, XHTML is an xml-based markup language, it looks like HTML, there are some small but important differences, XHTML is a role like HTML to play the XML, so, essentially speaking, XHTML is a transition technology that combines the powerful features of XML (in some cases) with the simplicity of HTML (most).

At the end of 2000, the International World Wide Web Consortium announced the release of the XHTML 1.0 version. XHTML 1.0 is a new language that is optimized and improved on the basis of HTML 4.0, and is designed to be based on XML applications. XHTML is an enhanced HTML, and its scalability and flexibility will accommodate more requirements for future network applications. The following is a common basic question about XHTML that is answered by Steven Pemberton, chairman of the HTML Working Group of the Consortium.

Q: What is XHTML?

A: XHTML is an HTML that has been rebuilt to accommodate XML. When XML becomes more and more of a trend, the question arises: if we have XML, do we still need HTML? In order to answer this question, we held a two-day working meeting in San Francisco in May 1998, and the meeting concluded: need. We still need to use HTML. Because a lot of people are used to using HTML as their design language, and millions of pages have been written in HTML.

Q: Why does XHTML 1.0 grow independently of HTML 4.0?

A: That's not true. XHTML is exactly the re-organization of HTML 4.0, which is exactly HTML 4.01, a revised version of HTML 4.0, but named distribution in XHTML 1.0. Their explanations in XML have some necessary differences, but on the other hand they are still very similar, and we can think of XHTML work as a continuation of HTML 4.0.

Q: How does XHTML 1.0 implement XML standards?

A: XHTML is an XML application. It takes the XML DTD file format definition and runs on XML-enabled systems. Thanks to the namespaces capabilities of XML, browser manufacturers do not need to create new private tags (tags), they only need to include XML snippets in XHTML code, or XML code contains XHTML snippets.

2. What are the characteristics of XHTML compared to HTML?

(1) XHTML addresses the problems that exist in the HTML language that seriously constrain its development. The HTML development to today exists three main disadvantages: can not adapt to the more network equipment and application needs, such as mobile phones, PDAs, information appliances can not directly display HTML; Because the HTML code is not specification, bloated, the browser needs to be smart enough and large to display the HTML correctly, data and performance mixed, If you want to change the display of your page, you must make the HTML again. So the HTML needs to evolve to solve the problem, and the xhtml,xhtml is a bridge over HTML to XML.

(2) XML is the trend of web development, so people are eager to join the trend of XML. XHTML is the current standard for replacing HTML4 markup languages, and with XHTML 1.0, you can design pages that fit both the XML system and most of the current HTML browsers as long as you follow some simple rules carefully. This means that you can design XML right away without waiting for people to use browsers that support XML. This guideline enables a smooth transition of the Web to XML.

(3) Another advantage of using XHTML is that it is very tight. The bad situation of HTML on the current network is shocking, the early browsers accept private HTML tags, so people have to use a variety of browsers to detect the page after the page design, to see whether it is compatible, there are often many inexplicable differences, people have to modify the design to adapt to different browsers.

(4) XHTML is a good interaction with other xml-based markup languages, applications, and protocols.

(5) XHTML is part of the Web Standard family and can be good for other user agents, such as wireless devices.

(6) in web Design, XHTML can help you remove the abuse of the presentation layer code, helping you to develop the habit of marking validation to test the work of the page.

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