XHTML web tutorial


This article is mainly for beginners to understand some basic knowledge of XHTML and some differences between XHTML and HTML. I hope it will be helpful for beginners.
This article is mainly for beginners to understand some basic knowledge of XHTML and some differences between XHTML and HTML. I hope it will be helpful for beginners.
HTML language is a tool for us to build web pages. From its emergence and development to now, the specification has been continuously improved and the function has become stronger and stronger. However, there are still defects and deficiencies. People are still improving it to make it easier to control and flexible, so as to meet the changing application needs on the network. At the end of 2000, the international W3C (World Wide Web Consortium) announced the release of XHTML version 1.0. What’s the difference between XHTML and HTML, and what new functions it adds? Let’s have a preliminary understanding of XHTML today.
XHTML 1.0 is a new language optimized and improved on the basis of HTML 4.0, which aims at XML based applications. XHTML is an enhanced HTML. Its scalability and flexibility will meet the needs of more network applications in the future. The following are the common basic questions about XHTML answered by Steven Pemberton, chairman of the W3C HTML working group.
Q: what is XHTML?
A: XHTML is a kind of HTML that has been reinvented to adapt to XML. As XML becomes more and more 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. The conclusion of the meeting was: Yes. 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 are written in HTML.
Q: Why did XHTML 1.0 develop independently from HTML 4.0?
A: not so. XHTML is exactly the reorganization of HTML 4.0. (to be exact, it is HTML 4.01, a modified version of HTML 4.0, which is just distributed under the name of XHTML 1.0.) There will be some necessary differences in their interpretation in XML, but on the other hand, they are still very similar. We can see XHTML’s work as a continuation of HTML 4.0.
Q: how does XHTML 1.0 implement the XML standard?
A: XHTML is an XML application. It adopts the DTD file format definition of XML and runs on the system supporting XML. Thanks to the namespaces function of XML, browser manufacturers do not need to create new private tags. They only need to include XML code fragments in XHTML code or XHTML code fragments in XML code.
Q: what are the main advantages of XHTML 1.0?
A: XML is the trend of web development, so people are eager to join the trend of XML. Using XHTML 1.0, as long as you carefully abide by some simple rules, you can design pages that are suitable for both XML system and most current HTML browsers. This means that you can design and use XML immediately without waiting for people to use XML enabled browsers. This guideline enables a smooth transition from the web to XML.
Another advantage of using XHTML is that it is very tight. At present, the bad situation of HTML on the network is shocking. Early browsers accepted private HTML tags, so people must use various browsers to detect the page after 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.
With XML, we can re-establish the system. 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: with XHTML, will web designers encounter the same browser compatibility problems as HTML?
A: I hope not. “Strict error prevention standards” will help browsers respond to the same code. The namespace function of XML allows you to add your own new tags without special browser support. Now what we need to ensure is that all browser developers are consistent and fully comply with the CSS we set. Write to your browser manufacturer and tell you the CSS specification you need. You can even check whether the browser listens to your design.
Q: is learning XHTML difficult?
A: not at all!
Q: who can use XHTML 1.0 design?
A: because XHTML is very simple and easy to implement, anyone who can use HTML can easily use XHTML. When more and more people use XML browsers, more work will be recommended to use XML, and XHTML may be used at that time.
Q: when will XHTML websites become popular?
Answer: OK. 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 is too easy.
Q: how do we convert existing HTML to XHTML?
A: very simple, because they are very similar. On the W3C (www.w3c. ORG) website, there is an open source software called HTML Tidy, which can help you directly convert.
Q: what will happen to XHTML in the future?
Answer: XHTML 1 0 is just the first step in this new HTML language. The new version will not be downward compatible with the constraints of the old browser, and there can be more room for development.
First, we will do a thorough clean-up to remove incompatible elements in HTML 4.0.
Secondly, we modularize XHTML, allowing people to use XHTML modules (such as tables) in XML applications to reduce repeated development. It also allows the development of special-purpose designs, 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 functions to allow more detection on the client and reduce the network information transmission between the client and the server. In short, more exciting features will be implemented.

Recommended Today

linux learning

Linux 1 Overview is an operating system The difference between linux and centos 7 is like the difference between windows and windows 7 On the server side, Linux is very popular in the development world The server uses the command line, and we also learn based on the command line 2. Environment construction 2.1 Download […]