10 essential differences between HTML4 and html5.

Source: Internet
Author: User

 

HTML5 is the latest HTML specification. Every web developer will find that they need to use this new standard. In addition, many of them will find that, due to the difference between HTML4 and html5. creating an HTML5 website is far easier than migrating from HTML4 to html5.

 

In fact, HTML5 has not made significant changes to HTML4, and there are many similarities between them.

 

However, you still need to pay attention to the main differences between the two. The following are the main differences between HTML4 and html5. (not all are listed. It is impossible to list all of them ):

 

1. HTML5 is still a standard in development

 

The first difference is obvious, but it is also very important to start from it. You may have seen a lot of comments about HTML5 everywhere, but these cannot change the fact that HTML5 is still a standard. HTML4 may be over 10 years old, but the fact that it is a formal standard has not changed.

 

On the other hand, HTML5 is still in its initial stage and many changes are expected. You must take these factors into account, because the newly added or modified web page elements you use on your website will change multiple times every year, you need to constantly update and upgrade your website. This is not what you want. This is why HTML4 is recommended in the product so far, and only HTML5 is used in the experiment.

 

2. Simplified syntax

 

The simpler doctype Declaration is one of the many new features in HTML5. Now, you only need to write <! Doctype html>. The HTML5 syntax is compatible with HTML4 and XHTML1, but not SGML.

 

3. The new <canvas> flag replaces flash.

 

For Web users, Flash is both a surprise and a pain. Therefore, some developers are not satisfied with the HTML5 Flash threat approach, but for those who endure the bloated Flash video that takes a long time to load and run, the new <canvas> technology that marks rendering images has come true.

 

Currently, the <canvas> flag cannot provide all Flash functions, but in time, it will surely be eliminated from the web! We will wait and see because many people doubt this.

 

4. New

 

HTML5 is designed to better depict the anatomical structure of the website. This is why some new tags such as

 

When developing a website, you no longer need to use the <div> mark to mark these parts of the webpage.

 

5. New <section> and <article> tags

Similar to the

 

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

 

6. New <menu> and <figure> labels

The new <menu> tag can be used as a normal menu or a toolbar or right-click menu, although these items are not commonly used on pages.

 

Similarly, the new <figure> tag is a more professional way to manage text and images on pages. Of course, you can use a style sheet to control text and images, but it is more suitable to use the HTML5 built-in mark.

 

7. New <audio> and <video> tags

 

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

 

In addition, there are some new multimedia tags and attributes, such as <track>, which are used to provide text information for tracking videos. 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 original Web2.0.

 

8. New Forms

 

The new <form> and <forminput> tags completely modify the original form elements. They have many new attributes (and some modifications ). If you often develop forms, you should spend more time studying them in detail.

 

9. The <B> and <font> labels are no longer used.

 

For me, this is a change that I don't quite understand. I don't think removing the <B> and <font> tags will bring much benefit. I know that the official guide says these tags can be better processed through CCS, but in this way, in order to appear in one or two parts of the article, you need to implement this function in two separate places: css and text. Isn't it clumsy. Maybe we will get used to this method later.

 

10. no longer use the <frame>, <center>, <big> flag

 

As a matter of fact, I can't remember when I used these tags, so I am not sad to remove them. For the same reason, there are better tags to implement their functions-this is good, and any obsolete tags are welcome to be removed from the standard.

 

The differences between the 10 HTML5 and HTML4 are only a small part of the new specification. In addition to these major changes, I can also mention some minor changes, such as modifying the <ol> tag attributes so that they can be sorted in reverse order, the <u> tag is also modified.

 

There are a large number of minor changes. New modifications are also constantly increasing. Therefore, if you want to track the latest trends in real time, you need to regularly view different pages between HTML4 and html5. If you are in a hurry and want to use these new tags and attributes in your work, I suggest you do your best to just experiment. The reason is clear, these new tags and new attributes may change greatly in the future. Therefore, they may expire unless you constantly update your code.

 

Although most popular browsers support HTML5 in the latest version, some new (or modified) tags and attributes are not supported, therefore, Your webpage may display inconsistencies on the user's screen. Be patient and wait for HTML5 to be practical. It is not time yet.

 

Try to respect the original text and make a part of the free translation. If not, please kindly advise!

 

Http://www.developerdrive.com/2011/08/10-essential-differences-between-html4-and-html5/

From the far-reaching column of tranquility

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.