HTML language is our tool for building web pages. From its emergence and development to the present, the specifications have been continuously improved and the functions have become stronger and stronger. However, there are still flaws and shortcomings, and people are still constantly improving it to make it more controllable and resilient to adapt to the ever-changing application needs on the Internet. At the end of 2000, the International W3C (World Wide Web Consortium) organization announced the release of XHTML version 1.0. What is the difference between XHTML and HTML, and what new features it has added? Let's get familiar with XHTML today.
XHTML 1.0 is a new language optimized and improved based on HTML 4.0, with the purpose of being based on XML applications. XHTML is an enhanced HTML, and its scalability and flexibility will adapt to the needs of future network applications. Below are common basic questions about XHTML answered by Steven pemberton, chairman of the W3C's HTML Working Group.
Q: What is XHTML?
Answer: XHTML is a kind of HTML that is remodeled to adapt to XML. As XML becomes more and more a trend, a question arises: If we have XML, do we still need HTML? To answer this question, we held a two-day working meeting in San Francisco in May 1998, and the conclusion of the meeting was: Need. We still need to use HTML. Because a large number 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 develop independently compared to HTML 4.0?
Answer: This is not the case. XHTML is precisely the reorganization of HTML 4.0 (To be precise, it is HTML 4.01, a revised version of HTML 4.0, but it is released after XHTML 1.0.) There are some necessary differences in their interpretation in XML, but on the other hand, they are still very similar. We can regard XHTML work as a continuation based on HTML 4.0.
Q: How to implement the XML standard in XHTML 1.0?
Answer: XHTML is an XML application. It is defined in XML's DTD file format and runs on XML-enabled systems. Thanks to the Namespaces function of XML, browser manufacturers do not need to create new private tags. They only need to include XML code snippets in the XHTML code, or XHTML code snippets in the XML code.
Q: What are the main advantages of XHTML 1.0?
Answer: XML is a trend in web development, so people are eager to join the XML trend. With XHTML 1.0, as long as you carefully abide by some simple rules, you can design pages that are suitable for both the XML system and most current HTML browsers. This means that you can design XML immediately without waiting until people use XML-enabled browsers. This guideline allows a smooth transition to XML for the web.
Another advantage of using XHTML is that it is very tight. The current bad situation of HTML on the Internet is shocking. Early browsers accepted private HTML tags, so people had to use various browsers to detect the page after the page design was completed to see if it was compatible. There are often many inexplicable differences, and people had to modify the design to adapt to different browsers.
With XML, we can re-establish the system, and browser manufacturers jointly adopt "strict error defense standards". If the XML code is incompatible, the browser refuses to display the page. In this way, every error must be corrected before publishing.
Q: Will web designers encounter the same browser compatibility issues as HTML when using XHTML?
Answer: Hopefully not. "Strict Error Defense Standards" will help browsers respond to code the same, and XML's namespaces feature allows you to add your own new tags without the need for extraordinary browser support. All we need to be assured now is that all browser developers are consistent and fully comply with the CSS we have created. Write to your browser manufacturer to tell you the CSS specifications you need, and you can even detect if your browser obeys your design.
Q: Is it difficult to learn XHTML?
Answer: Not at all!
Q: Who can use XHTML 1.0 design?
A: Because XHTML is very simple and easy to implement, anyone who knows how to use HTML can easily use XHTML. As more and more people use XML browsers, more jobs will be recommended to use XML, and then perhaps all will use XHTML.
Q: When will XHTML website become popular?
Answer: Good question. I've seen some websites built using XHTML, even before XHTML 1.0 was released. I believe it will have a big development because it's too easy.
Q: How do we convert existing HTML to XHTML?
A: Very simple because they are very similar. There is a software called HTML Tidy on the W3C (www.w3c.org) website called HTML Tidy, which can help you convert directly.
Q: What will happen to XHTML in the future?
A: XHTML1.0 is just the first step in this new HTML language. The new version will not have backward compatible constraints for old browsers, and there will be more room for development.
First, we will do a thorough cleanup to remove incompatible elements in HTML 4.0.
Secondly, we modularize XHTML and allow people to use XHTML modules (such as tables) in XML applications to reduce duplicate development. It is also agreed to develop designs for extraordinary purposes, such as telephone applications, which can remain compatible as long as they belong to a subset of XHTML, and people can create their own HTML.
Finally, in terms of solving the needs, we will develop more forms (Forms) functions, agree to perform more detection on the client and reduce network information transmission between clients and servers. In short, more exciting features will be implemented.