The difference between Html5 and Html4

Source: Internet
Author: User

The difference between Html5 and Html4

HTML5 is the next version of the HTML standard. Although HTML5 does not completely subvert HTML4, there are some differences between them. See http://dev.w3.org/html5/html4-differences/for the latest and most complete HTML5-HTML4 comparison information. In this world where IE still exists, HTML5 differences can be mastered first, and it is not too late to study them carefully after all the support.

1. Simplified syntax
HTML5 simplifies many subtle syntaxes, such as the doctype statement. You only need to write <! Doctype html>. HTML 5 specifies the UTF-8 encoding method as follows <meta charset = "UTF-8">

2. The <canvas> label replaces Flash.
Flash brings troubles to many Web developers. A bunch of code and plug-ins are required to play Flash on webpages. <Canvas> Labels allow developers to use only one tag to interact with the user's UI.

3. added many labels.
One principle of HTML5 design is to better reflect the semantic nature of the website. Therefore, tags such as

Copy the Code as follows:
<Video width = "450" height = "340" controls>
<Source src = "jamshed.mp4" type = "video/mp4">
Your browser does 'nt support video embedding feature.
</Video>
Similarly, audio and other features are similar.

4. Brand new forms
HTML5 on the <form> and <forminput> label a lot of modifications, added a lot of new attributes, also modified a lot of attributes, detailed http://www.jb51.net/w3school/html5/html_5_form_attributes.htm

5. Delete <B> and <font> tags, <frame>, <center>, and <big> tags.

6. HTML5 supports Different Storage types

HTML5 supports local storage, which is implemented through cookies in earlier versions. HTML5 local storage is fast and secure. In addition, HTML5 has two different objects that can be used to store data. HTML5 uses JS to store and access data:

LocalStorage is suitable for storing data for a long time. data will not be lost after the browser is closed.
SessionStorage only stores data for a session. The stored data is automatically deleted after the browser is closed.

In general, HTML5 has gone beyond the scope of the markup language, and more semantic tags will make HTML5 more useful. Canvas + WEBGL and other technologies to achieve plug-free animation, image and graphics processing capabilities; local storage, offline applications; websocket, a change to the http pure pull model, to realize the dream of Data push, such as MathML and SVG, and support more extensive render, etc. Now we only need to know HTML5 on the surface, I will read more HTML5 books in the future to increase my knowledge.

Related Article

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.