Front-end Developers notice the difference between HTML5 and HTML4

Source: Internet
Author: User

Front-end Developers notice the difference between HTML5 and HTML4

HTML5 is the latest HTML standard, sooner or later, all Web programmers will find it necessary to use this latest standard, and many people will feel that it is much easier to recreate a HTML5 site than to move a site from HTML4 to HTML5. This is because there are a lot of differences between the two versions.

In fact, HTML5 does not make any significant changes to HTML4, many of which are similar.

However, there are some important differences you need to know. The following are the main differences between some HTML4 and HTML5 (not all of which are impossible to list):

1. The HTML5 standard is still in development
The first difference is obvious, but very important, and I need to start with it first. You may have noticed that the cool talk about HTML5 is everywhere, but the fact is that HTML5 is an unfinished standard. HTML4 is already 10 years old, but the fact that it is still a formal standard has not changed.

On the other hand, HTML5 is still in its early stages, and subsequent revisions will continue to occur. You have to take that into account because the new additions or modifications you use on the site will change every year, and you need to keep updating your site, which is not what you want. That's why you'd better use HTML4 in your product so far, and use HTML5 only in the experiment.

2. Simplified grammar
A simpler DOCTYPE statement is one of the many new features of HTML5. Now all you have to do is write <!doctype html> HTML5 syntax is compatible with HTML4 and XHTML1, but is not compatible with SGML.

3. A new <canvas> logo to replace Flash
For web users, Flash is both a surprise and a pain. There are a lot of web developers who are dissatisfied with HTML5 's threat to flash. But for those who endure bloated flash videos that take years to load and run, the technology to generate video with new <canvas> tags has come.

At present, <canvas> tags do not provide all the features of Flash, but in time, Flash will be eliminated from the Web. We will wait and see, because many people do not agree with this view.

4. New HTML5 's design is to better depict the site's anatomical structure. This is why these new tags, such as

When you develop a Web site, you are not using the <div> tag to mark these parts of the page.

5. New <section> and <article> tags
Similar to the

It is speculated that, in addition to making the code more organized, it can also improve the SEO effect, make it easier for search engines to analyze your page.

6. New <menu> and <figure> tags
New <menu> tags can be used as normal menus or on toolbars and right-click menus, although they are not commonly used on the page.

Similarly, the new <figure> tag is a more professional way of managing text and images on the page. Of course, you can use style sheets to control text and images, but using the HTML5 built-in tag is more appropriate.

7. New <audio> and <video> tags
The new <audio> and <video> tags may be the two most useful items added to the HTML5. As with tag names, they are used to embed audio and video files.

In addition, there are a number of new multimedia tags and attributes, such as <TRACK>, which is used to provide tracking video text information. With these tags, HTML5 makes Web2.0 features more and more friendly. The problem is that before HTML5 is widely accepted, Web2.0 is still the old Web2.0.

8. New Form Design
New <form> and <forminput> tags make new changes to existing form elements, and they have many new attributes (and some modifications). If you regularly develop forms, you should take the time to study them in more detail.

References: http://blog.suiyidian.cn/post-92.html

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.