The difference of HTML5 in HTML4

Source: Internet
Author: User

Many people will find that because of the difference between HTML4 and HTML5, creating a new HTML5 site is far easier than migrating from HTML4 to HTML5.

In fact, HTML5 did not make a very significant adjustment to HTML4, and there were many similarities between the two.

Nonetheless, the main difference between the two remains to be noted. Here are the main differences between HTML4 and HTML5 (not all of them, all listed are impossible):

1, HTML5 is still a set of standards

The first difference is obvious, but it's also a very important one, and we start with it. You may have seen a lot of cool talk about HTML5 all over the place, but none of this can change the fact that HTML5 is still an established standard. HTML4 may have been over 10 years old, but the fact that it is a formal standard has remained unchanged.

On the other hand, HTML5 is still in its infancy, and many changes are expected. You have to take these factors into account, because the new additions or modifications you use on the site will change over time every year, and you'll need to keep updating your site, which is not what you want. This is why, so far, it is best to use HTML4 in the product, only to use HTML5 in the experiment.

2. Simplified syntax

A simpler DOCTYPE statement is one of many new features in HTML5. Now, just write <!doctype html> just fine. The HTML5 syntax is compatible with HTML4 and XHTML1, but is not compatible with SGML.

3, new <canvas> tag instead of Flash

For web users, Flash is both a surprise and a pain. As a result, some developers resent the HTML5 threat to flash, but for those who endure bloated flash video that takes a long time to load and run, the technology to render images with new <canvas> tags has come true.

Currently,<canvas> tags do not provide all the features of Flash, but in time, it will flash from the Web to be eliminated! We have to wait and see, because many people doubt that.

4. New

HTML5 is designed to better depict the anatomical structure of the site. This is why some new tags like

When you develop a Web site, you no longer need to label these parts of the page with the <div> tag.

5. New <section> and <article> marks

Like

Presumably, in addition to making the code more organized, it can also improve the SEO effect, can make the search engine easier to analyze your page.

6. New <menu> and <figure> marks

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

Again, the new <figure> tag is a more professional way of managing text and images on a 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> marks

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

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

8. The new level of the form

New <form> and <forminput> tags make new changes to the original form elements, and they have a lot of new properties (and some modifications). If you develop the form frequently, you should take the time to study it in more detail.

9. No longer use <b> and <font> marks

For me personally, this is a change that I don't quite understand. I don't think there is much benefit in removing <b> and <font> tagging. I know that the official guidelines say that these tags can be better handled by CCS, but in this way, it's not awkward to have this feature in separate CSS and text two places for this type of markup to appear in the one or two places in the article. Maybe we'll get used to this method later.

10. No longer using <frame>, <center>, <big> 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 marks to achieve their function--which is good, and any obsolete mark removed from the standard is welcome.

The difference between these 10 HTML5 and HTML4 is only a small part of the entire new specification. In addition to these major changes, I can also briefly mention a few minor changes, such as modifying the <ol> tag properties, so that it can be inverted, and the <u> tag has been modified.

All of these minor changes are large in number. And the new changes are constantly increasing, so if you want to keep track of the latest trends in real time, you need to look at the different pages of w3.org HTML4 and HTML5 frequently. If you are impatient and want to use these new tags and attributes in your work, I advise you to just do the experiment, and the reason is clear that these new tags and properties may change a lot in the future, so unless you keep updating your code, they are likely to expire.

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

The difference of HTML5 in HTML4

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.