Chapter 1 New Understanding

Source: Internet
Author: User

HTML5 is designed based on a variety of ideas (detailed in the whatwg specifications), which reflect a new understanding of possibilities and feasibility.

    1. Compatibility
    2. Practicality
    3. Interoperability
    4. General access

1.4.1 compatibility and presence are reasonable

Don't worry, HTML5 is not a disruptive innovation. On the contrary, a core concept of HTML5 is to maintain a smooth transition of all new features. Once the browser does not support a certain HTML5 function, the alternative behavior for the function will be quietly carried out. Besides, some HTML documents on the Internet have existed for more than 20 years. Therefore, it is very important to support all existing HTML documents.

HTML5 researchers have also spent a lot of energy Studying General behaviors. For example, Google analyzed millions of pages, analyzed the common ID name of the DIV tag, and found that the repeated amount is large. For example, many developers use Div id = "Header" to mark the header area. Isn't HTML5 actually a solution? Why not add a

1.4.2 efficiency and user priority

HTML5 standards are written based on user priority rules. The purpose is "user is God". This means that users are placed first in the case of unresolved conflicts, the second is the page author, the second is the implementer (or browser), the second is the standard maker (W3C/whatwg), and finally the theoretical purity is considered. Therefore, most of HTML5 is practical, but in some cases it is not perfect. Take a look at this example. The following code can be identified in HTML5.

Id = "prohtml5 ″

Id = prohtml5

Id = "prohtml5 ″

Of course, some people will certainly oppose this non-strict syntax. We will not debate right or wrong, but focus only on the bottom line, that is, the end user does not really care about how to write the code. Of course, we do not advocate that the author is not so rigorous in writing code at the beginning. After all, after all, the victim is still the end user, because once a page error is caused by a developer, it cannot be displayed normally, so it must be the end user.

HTML 5 is also derived from xhtml5 (effective HTML5 code can be generated using XML tools ). The Code of HTML and XHTML versions should be serialized to generate almost the same DOM tree. Obviously, XHTML has much stricter verification rules. The last two lines of code in the example just now cannot pass verification.

1. Security Mechanism Design

To ensure HTML5 security, HTML5 has done a lot of work in design. Each part of the specification has a security-specific chapter, and security is given priority. HTML5 introduces a new source-based security model, which is not only easy to use, but also common to various APIs. This security model allows us to do something we couldn't do before. We don't need to use any smart, creative, but insecure hack to perform cross-origin Security conversations. In this regard, we certainly will not miss the past "good" time.

2. Performance and content Separation

HTML5 has taken a huge step in clear separation of performance and content. HTML5 tries to separate all possible places, including CSS. In fact, the HTML5 specification does not support most of the performance functions of the old version of HTML, but those functions can still be used thanks to the previously mentioned HTML5 design concepts in compatibility. The concept of representation and content separation is not completely new. It has been used in HTML 4 transitional and XHTML 1.1. Web designers have used this concept as a best practice for a long time, but it is more important to clearly separate the presentation and content. Otherwise, the following will occur:

Disadvantages:

Poor accessibility;

Unnecessary complexity (all style code is placed on the page, and the code is poorly readable );

The larger the file (more style content, the larger the file), the consequence is that the page loading slows down.

 

1.4.3 simplified and traditional

HTML5 requires simplicity and avoids unnecessary complexity. The HTML5 slogan is "Simplicity first, simplify as much as possible ". Therefore, HTML5 has made the following improvements:

Replaces complex JavaScript code with browser native capabilities;

New simplified doctype;

New simplified Character Set Declaration;

Simple and powerful HTML5 API.

The improvements will be explained in detail later.

To implement all these simplified operations, the HTML5 specification has become very large because it needs to be precise and accurate. In fact, it is more accurate than any previous version of the HTML specification. In order to achieve the true connectivity of browsers in 2022

Goals: HTML5 norms define a series of clearly defined behaviors. Any ambiguity or ambiguity may delay the implementation of this goal. In addition, HTML5 specifications are more detailed than any previous version to avoid misunderstanding. The goal of HTML5 specifications is to completely and thoroughly define them, especially for Web applications. So it's no wonder that the entire specification is over 900 pages! Based on a variety of improved and powerful error handling solutions, HTML5 provides a good error handling mechanism. It is very practical that HTML5 advocates smooth recovery of major errors and puts the interests of end users first. For example, if an error occurs on the page, the display of the entire page may be affected in the past, but HTML5 does not. Instead, the "broken" mark is displayed in a standard way, this is due to the error recovery mechanism precisely defined in html5.

 

1.4.4 General access

This principle can be divided into three concepts.

Accessibility: for users with disabilities, HTML5 and Wai (Web Accessibility Initiative, Web Accessibility Initiative) and Aria (accessible rich Internet applicaions, accessible rich Internet applications) with close integration, elements in the WAI-ARIA Based on the screen reader have been added to HTML.

HTML5 functions should work properly on all different devices and platforms. Media neutral: if possible, all languages are supported. For example, new <Ruby> elements support Ruby annotations used in East Asian page layout.

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: info-contact@alibabacloud.com 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.