The 10 major differences between HTML4 and HTML5

Source: Internet
Author: User

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 it. HTML5 syntax is compatible with HTML4 and XHTML1, but is not compatible with SGML.

3. A new mark 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, technology has come to generate video with new tags.

At present, the tags do not provide all the functionality 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 and marked

HTML5 's design is to better depict the site's anatomical structure. That's why these and

And so on, they are specifically designed to mark these parts of the site.

When developing a website, you don't need to use

Tag to label these parts of the page.

5. New and marked

Like the tag, the new and markup introduced in HTML5 allows developers to better annotate these areas on the page.

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. The new

and Mark

of the new

Tags can be used as normal menus or on toolbars and right-click menus, although they are not commonly used on pages.

Similarly, the new markup 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 and marked

The new and the mark may be the most useful two things added to the HTML5. As with tag names, they are used to embed audio and video files.

In addition, there are new multimedia tags and attributes, for example, that are used to provide tracking of video text messages. 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

of the new

And mark new changes to existing form elements, which have many new attributes (and some modifications). If you regularly develop forms, you should take the time to study them in more detail.

9. No longer used and marked

For me personally, this is a change that I don't quite understand. I do not think that the removal and marking will bring much benefit. I know that official guidance says that these tags can be better handled through CCS, but in order to do this in one or two places in the article, you need to do this in separate CSS and two places in the text. Maybe we'll get used to this method later.

10. No longer used,

Mark

In fact, I can't remember when I used these tags, so I don't feel sad about removing them. For the same reason, there are better tags to achieve their functions--well, it's good that any voided tags that are excluded from the standard are popular.

The difference between these 10 HTML5 and HTML4 is only a small part of the whole new specification. In addition to these major changes, I can briefly mention some minor changes, such as modifying

tag, so it can be sorted, and the markup is modified.

All of these minor changes are numerous. And the new changes are constantly increasing, so if you want to keep track of the latest trends in real time, you need to constantly see the difference between W3.org's HTML4 and HTML5. If you're impatient and want to use these new tags and attributes in your work, I advise you to do the experiment, the reason is clear, these new tags and new attributes may be a big change in the future, so unless you constantly update your code, they are likely to expire.

Although the latest version of most popular browsers today supports HTML5, some new (or modified) tags and attributes are not supported, so your page may appear inconsistent on the user's screen. Wait patiently and wait for HTML5 to really be practical. It's not the right time.

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.