Differences between html4 and html5.

Source: Internet
Author: User

HTML5 is the next version of the HTML standard. More and more programmers are starting to use HTML5 to build websites. If you use both html4 and HTML5, you will find it much easier to migrate from html4 to html5. Although HTML5 does not completely subvert html4, there are many similarities between them, but they also have some key differences. This article lists the 10 key differences between them.

1. HTML5 standards are still being developed
The first thing to note is that although HTML5 is currently very popular, the HTML5 standard is still being developed and the standard is still changing. Html4 has been around for more than 10 years.

2. Simplified syntax
HTML5 simplifies many subtle syntaxes, such as the doctype statement. You only need to write <! Doctype HTML>. HTML5 is compatible with HTML5 and xhtml1, but not SGML.

3. 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. Although currently, the <canvas> label cannot implement all flash functions, soon <canvas> will make flash look boring, haha!

4. Added One principle of HTML5 design is to better reflect the semantic nature of the website. Therefore, tags such as

5. Added <section> and <Article> labels.
Similar to

6. Added <menu> and <figure> labels.
<Menu> it can be used to create a traditional menu or a toolbar or context menu. <Figure> labels make the text and Image Layout of webpages more professional.

7. Added <audio> and <video> labels.
These two tags may be the two most useful tags in HTML5. As the name suggests, these two tags are used to play audio and video.

8. Brand new forms
HTML5 makes a lot of changes to the <form> and <forminput> labels, adds many new attributes, and modifies many attributes.

9. Delete <B> and <font> tags
I still cannot understand this improvement. I don't think deleting these two tags can greatly improve the code. The official explanation is that CSS should be used to replace the two labels. However, I still think these two labels are very convenient for simple text.

10. Delete the <frame>, <center>, and <big> labels.
I can't remember when these labels were used last time.

The above 10 points is only a small part of the difference between HTML5 and html4, the latest and most comprehensive HTML5-HTML4 comparison information please see

Http://dev.w3.org/html5/html4-differences/

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.