HTML 5 is the next important version of the hypertext markup language. Since HTML 4.01 was released in 1999, its development has been at a standstill. 1999 has happened to be the time for the rapid development of the web. The current HTML version can no longer adapt to the current Web content and applications. HTML 5 aims to improve HTML interaction and support the current diverse and complex web content. At the same time, it will also solve the lack of HTML 4 web application functions.
The discussion of HTML 5 began in 2003 when W3C expressed interest in the draft HTML 5 developed by the Web Hypertext Application Technology Working Group (WHATWG), founded in 2004 and consisted of representatives from Apple, the Mozilla Foundation, and Opera. Since then, W3C HTML Working Group was established in 2007 and started developing HTML 5. At present, development work is still in progress and preliminary opinions will be submitted to W3C in 2012, but many browsers have partially supported HTML 5. This article introduces 5 exciting new features of HTML 5.
The diversity of web content makes HTML4 unable to do so. When describing a web page, HTML4 is as follows:
HTML 5 will perform as follows:
In this way, the browser knows what each part of a web page represents, for example, the <nav> part is navigation, and the <article> part is the main content. In addition to more beautiful code and semantic tags, this change also brings more benefits, such as search engines can know more accurately which part of a web page is more important. IBM has a detailed discussion on the new HTML 5 tag.
HTML 5 introduces Web Forms 2.0, providing development with many new options and new features to handle form input and publishing easier and more efficiently. The most exciting feature of Web Form 2.0 is input verification. At present, we need to implement the same function through JavaScript or server-side logic.
For example, there is a form like this:
In HTML4 we need to write code like this, and then use JavaScript or server-side scripts to verify:
required与email attributes in HTML5 can be directly verified, as follows:
HTML 5 will provide multiple APIs, such as audio and video tags, which allow developers to directly play web video and audio without using third-party tools:
Opera has a lot of research on the user side and has video playback demo launched
It is easier for people to obtain information from pictures. For example, the following information is displayed in two ways: tables and round pie charts, and the effects are obviously different:
However, in the past, to achieve this effect, only static images could be used, and the pictures could not be adjusted. Using the <canvas> tag, you can modify parameters in real time to modify the graphics, such as generating a circle pie chart in real time based on user voting.
HTML 5 will support user interaction, and the contenteditable property allows you to set which part of the web page can be edited. It is very practical in Wiki-based sites.
International source of this article: http://www.readwriteweb.com/archives/5_exciting_things_in_html_5.php
Chinese translation source: COMSHARP CMS official website