Most people use HTML 4 and HTML 1 to write web pages. Few HTML enthusiasts understand the concept of semantic HTML, verify the HTML structure, and improve the accessibility of documents. High-quality HTML documents are the result of repeated trade-offs, design optimization, and discussion. Despite many criticisms, there is no way to compare the popularity of any language with HTML. Most users are satisfied with the standard. Most users use HTML 4 and XHTML 1 to write web pages. Few HTML enthusiasts understand the concept of semantic HTML, verify the HTML structure, and improve the accessibility of documents. High-quality HTML documents are the result of repeated trade-offs, design optimization, and discussion. Despite many criticisms, there is no way to compare the popularity of any language with HTML. Most users are satisfied with the standard status quo, as if they were born.
But like many other standards, HTML also has successors. Even now, experts are still considering the next version of HTML to solve all the known issues in the current version. Like anyone else, these experts have different opinions on the future direction of the job.
The first proposal for the new HTML Version comes from a W3C Working Group. The idea of this working group is centered on the XHTML 2-standard, continuing the development direction for further purifying XHTML and returning to the first version of HTML design concept.
Some important HTML experts outside W3C-browser vendors, Web developers, authors, and other related personnel-disagree with the direction of XHTML 2. In 2004, they set up an independent working group to propose a new design direction for the new HTML version. In the name of WHATWG (Web Hyper Text Application Technology Working Group), they launched HTML 5 and Web Forms 2.
Several years later, the draft work clearly described another direction of HTML development. In April 2007, W3C voted on whether to accept HTML 5's entry into the standard review procedure, and (not yet) did not acknowledge it as a formal standard. Most people agree. So there was an interesting situation: W3C simultaneously researched two competing HTML and XHTML successor technologies. Theoretically, both have good reasons. In practice, there are many obstacles to making all mainstream browsers support these two standards.
This is the basic fact that leads to the current situation. It is more meaningful to discuss the true differences between the two proposals. This article outlines the basic points of the two proposals, and then analyzes the design concepts of the two. Frequently used acronyms
CSS: Cascading Style Sheet
HTML: Hypertext Markup Language
W3C: World Wide Web Alliance
XHTML: A Brief History of extensible hypertext markup language XHTML
Understanding the hidden design concepts behind XHTML 2 requires a bit of history. In early 1990s, the first HTML version was based on the standard General Markup Language (SGML. The main difference lies in the hyperlink feature-the key foundation of the World Wide Web and the success factor. Like SGML, HTML allows the author to describe the structure of the document and separate the header and paragraph, ordered list, And unordered list. The display result on the screen is related to the browser.
With the increasing popularity of Web, HTML users need to control the view of pages. Browser vendors have introduced new features in HTML 2 and 3. The web page becomes hard to understand, and the complex nested table structure becomes the main means to control the page layout. The rest of the document is filled with font tags and color declarations. It is difficult to clarify the original document structure.
The appearance of HTML 4 is to end this confusion. It pushes the logic to CSS and introduces a layer (DIV) for Advanced content positioning ). Compared with HTML 3, this means that the code writing mode changes. To simplify the migration process, the Transitional version of HTML 4 supports the old HTML 3 structure. Strict versions for advanced users require that the content and representation be completely separated.
The first HTML 4 website uses DIV as the new holy grail. Almost every element on the page that requires slight modification is used, including (but not limited to) the header. The HTML style attribute is a common description of details. Finally, the flood of tables are eliminated from the web page. However, the content and representation logic are still mixed. There are only a few lines of necessary CSS files.
Recently, some well-known Web developers have proposed a more clever method for HTML 4 style sheets. In modern browsers, CSS attributes are not limited to DIV elements. You can specify a style for any HTML element as long as you want. Many weblogs start to talk about semantic HTML. The DIV element is not completely forbidden, but web page Writers start to use the HTML element most suitable for describing its content. For example, it is best to describe the navigation menus of most websites with Unordered Lists. Another example is to change the class name such as bigHeader to the H1 element instead of the section element, and then use CSS to modify the representation as required.
At the same time, W3C proposed XHTML 1 as an XML version of HTML 4 that conforms to the good structure and is effective. For XML users, this simplifies the process of converting XML content into a webpage and checking the conversion result with an existing verification program. XHTML 1.1 tries to isolate different problems into different modules. The modular method facilitates the reuse of different parts of the standard based on different requirements, and also facilitates the use of New Function Extension standards.
Compared with HTML 4, there are even more users in XHTML 1.1, splitting the content and representation. However, as in the past, some practical problems can only be solved using CSS skills. For example, a menu structure in an unordered list usually contains beautiful images. However, images are not easy to read to visually impaired people through text-speech facilities. In addition, text browsers such as Lynx cannot display images. A complex CSS technique can hide text display images in a browser. However, if the menus on different pages are different, it is difficult to specify this part with CSS. Design concepts behind XHTML 2
The most important design concept behind XHTML 2 is further separation of content and representation to improve the residual defects of HTML 4 and XHTML 1. For example, specify the native support for each image in the unordered list. The original img src tag is replaced with the optional attribute SRC that can be used for any element. The modified CSS is completely separated from the content. devices that do not support images can easily turn to text.
CSS is not the only challenge for Web developers. A large amount of time is used for server-to-HTML form interaction and the existence of a large number of JavaScript™Code. The form is limited to one-dimensional key-value pairs. JavaScript code development requires a lot of work, but it is useless on interfaces such as text-speech conversion devices.
Based on the modular method, XHTML 2 replaces HTML Forms with the XForms module, and adds support for common problems using appropriate application models. XForms can specify the interaction logic, verification rules, and calculation methods without a script line. In addition, this technology uses a rich XML structure rather than key-value pairs, allowing nested subforms and repeated elements. In addition to providing a powerful engine, text-speech devices are more suitable for changing the richness of applications.
In addition to XForms, there are also other XHTML-Related Issues extracted as independent specifications to meet other needs-such as XML Events, XFrames, and Ruby (Asian language ).
With the separation of representation, programming is also separated from the standard. Interaction attributes such as onClick are replaced by the XML Events module. Because the XML Events specification is designed for this purpose, it provides a more powerful set of tools to process user interfaces.
To sum up the innovations of XHTML 2, the basic concept is to break down different problems. The problem is no longer a secondary feature of HTML, but the main purpose of the new specification. Therefore, the new specifications are most suitable for optimization problems. However, we treat different problems differently out of ideas rather than practical needs. Smart developers who are familiar with this tool can get the desired results. However, it is not easy to say whether users of the current HTML version can create high-quality XHTML documents.
The target of XHTML 2 is probably not a common HTML user. But in the hands of good developers, it can be used as a good way to enhance accessibility. Design Concept of HTML 5
WHATWG adopts a more practical method when designing HTML 5. Without considering abstract ideas such as problem decomposition, this working group develops documents starting from the current mainstream browser behavior, which is completely different from W3C norms. Based on the above analysis, the Working Group investigated the actual use of HTML.
Based on this information, the Working Group proposed a solution to simplify the work of general Web developers. Although HTML 5 originated from the previous HTML version, its main goal is not pure purity. For example, the main purpose of a modular document is to easily replace it with an optimized Web application.
The modular language for this purpose greatly simplifies the development of Web applications. For example, HTML 5 supports interactive components such as data tables, menus, and toolbar. Using the descriptive HTML element of the default behavior can avoid using a large amount of code to simulate the behavior of a common DIV.
The HTML 5 specification is not limited to HTML elements and attributes. It defines specialized JavaScript APIs such as editing documents and drag-and-drop interactions. This method is totally different from the method used to resolve the problem. It simplifies Web developers' APIs but increases the standard size.
The similarity between HTML 5 and HTML 4 far exceeds the similarity between XHTML 2 and XHTML 1. The migration path is smoother. Experienced HTML 4 developers are more familiar with the new version. New features follow similar logic. Special event attributes of specific elements allow HTML editors to provide more appropriate text completion functions.
The interaction between the current Web application and the server depends on Asynchronous JavaScript XML (Ajax ). HTML 5 recognizes the importance of interaction with servers and defines multiple ways of interacting with the network, distributing received server events, and sending messages to documents from other domains without causing security issues.
The basic design concept of HTML 5 is to use the features required by Web developers to expand HTML 4. HTML 5 is simplified while inheriting the basic technology of HTML 4. To solve the problem of HTML V4, HTML V5 selects the simplest and most direct way to redesign. Practical application of new standards
XHTML V2 and related modules have been officially supported by W3C, and related modules have become an important factor in other XML specifications supported by W3C. Unfortunately, the W3C official approval does not guarantee the support of mainstream Web browsers. It is not a problem to support general XHTML V2: modern browsers already support many features. Correct use of XHTML V2 depends on the availability of relevant modules. When writing this article, does Microsoft want to extend Windows®Internet Explorer®It is not clear to support the XML Events and XForms features. Mozilla XForms plug-in, including XML Events, has been developed for several years. This plug-in improves the functionality of this technology and reduces the difficulty of implementation.
The compilation of HTML V5 specifications maintains in-depth communication with browser vendors and always considers implementation issues. Although the Team expressed doubts about W3C official acceptance. The FAQ did not even officially answer the question when the formal approval was passed. Regardless of W3C attitude, browser vendors seem to have decided to implement informal HTML 5 standards. Browser vendors have not been the first time since official standards were released. Competing standards
So far, neither HTML 5 nor XHTML 2 has been formally recommended. In the future, some nuances may change. However, their development direction will not change, and both have solved some shortcomings in the current standards. In the future, it remains to be seen how browsers will support these two new standards. The current browser supports both HTML 4 and XHTML 1. Similarly, future browsers may support both HTML 5 and XHTML 2. Both standards have their own supporters.
If you are more interested in XHTML 1.1 than HTML 4, you may prefer XHTML 2 If you want to create documents that support different devices. If you use XHTML 1 only because it complies with XML standards and prefers the new features of HTML 5, XHTML 5 (HTML 5 rewritten with XML) may be your best choice.
HTML 5 is quite popular with developers who use HTML 4 to develop interactive Web applications. This method is more feasible for websites that use WYSIWYG document editor. However, for specific analysis, HTML 4 and XHTML 1 are likely to coexist for a long time.
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.