Original text: http://www.alistapart.com/articles/previewofhtml5
Author: Lachlan Hunt
Translator: zhaozy in 3user.com
summaryThe Internet is constantly evolving. New and creative websites are emerging every day, impacting the boundaries of HTML in all aspects. HTML 4 has been around us for almost 10 years. Publishers are constantly seeking new technologies that provide more powerful functions, but they often have bumpy roads due to the constraints of markup languages and browsers.
To provide authors with more flexible, interoperable, more interactive and exciting websites and applications, HTML 5 introduces and enhances a range of features, including form control, application program interfaces (APIs), multimedia, structured and semantics.
The work of HTML 5 began in 2004 and is now fully implemented with the joint efforts of W3C HTML WG and WHATWG. Many key roles have participated in the W3C efforts, and the most representative of them are the four major browser manufacturers: Apple, Mozilla, Opera, Microsoft; and a series of other institutions and individuals with different interests and professional skills.
The work of writing specific specifications is still in progress and is still a long way from completion. Similarly, the functions discussed in this article do not rule out the possibility of any changes in the future. This article only introduces some of the main features in the current draft in the form of an outline.
structureHTML 5 introduces a complete set of new elements to make building pages easier. Most HTML 4-based pages contain many common structures, such as header, footer and column. At this stage, we usually tag these blocks with div elements and then define a descriptive id or class for them.
The chart illustrates a typical 2-column layout marked with div elements with id and class attributes. These include the header and footer. Below the top of the page is a horizontal navigation bar, and the main content includes the article and the sidebar to the right.
The large number of use of div elements is due to the lack of a clearer semantic description of these blocks in the current HTML 4 version. HTML 5 introduces new elements to represent these different blocks.
Those div elements can be replaced by new elements: header, nav, section, article, aside, and footer.
<body>
<header>...</header>
<nav>...</nav>
<article>
<section>
...
</section>
</article>
<aside>...</aside>
<footer>...</footer>
</body>
Using these new elements will have some advantages (relative to HTML 4). When used with the title element (h1 - h6), you can mark the nested chapter title levels, surpassing the previous version of 2 pages, previous pages, 12 next pages