Six design principles to be followed by html5 _ html5 tutorial skills-

Source: Internet
Author: User
Html5 can be quickly promoted only by following a series of principles in the design process. This article will introduce the six design principles that html5 follows. If you are interested, you can refer to the fact that html5 is not directly developed by w3c. The w3c direction is xhtml2, not html5. The w3c Working Group switched its research direction to html5. Why is xhtml2 never implemented? Because it violates a design principle, this design principle is the famous bertal law-to be conservative when sending; To be open when receiving. In the html5 design process, a series of principles are followed to facilitate the rapid promotion of html5. This article will introduce the six design principles followed by html5, as shown below:

Principle 1: Avoid unnecessary complexity

Html4

Html5



Html4

Html5



Principle 2: support existing content

In the following four sections of code, only the first section of xhtml is correct. In html5, all sections are correct.

Copy XML/HTML Code to clipboard

  1. Hello world

  2. Hello world

  3. Hello world

  4. Hello world

Principle 3: solving practical problems

In html4, even if two block-level element elements have the same link address, they must be written separately, because inline elements cannot contain block-level elements.

Headline text

Paragraph text.

In html5, because the content model is used, elements can also contain block-level elements.

Copy XML/HTML Code to clipboard

  1. Headline text

  2. Paragraph text.


Principle 4: Seeking Truth and being pragmatic

Html5 adds multiple elements, including section, article, aside, and nav. They represent a new content model-partition content. In the past, people used p to organize content on pages, but like other similar elements, p itself has no semantics. But section, article, aside, and nav are actually telling you clearly-this is like another document in the document. Any content in these elements can have its own summary, title, and foot.

Principle 5: stable degradation
 
When the browser encounters a type value that is not recognized, it will interpret the value of type as text

Input type = "number"
Input type = "search"
Input type = "range"
Input type = "email"
Input type = "date"
Input type = "url"

Principle 6: end users are given priority

In the event of a conflict, end users are given priority, followed by authors, followed by implementers, followed by standard makers, and finally theoretically completed.

The above are the six design principles that html5 should follow and hope to help you learn them.

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.