HTML5 is the latest HTML standard, or late or early, all web programmers will find it necessary to use this latest standard, and, many people will feel, to re-develop a HTML5 site, than to move a site from HTML4 to HTML5 more easily, This is because there are a lot of differences between the two versions.
In fact, HTML5 did not make any significant changes to HTML4, and many of them were similar.
However, there are some very important differences you need to know. The main differences between some HTML4 and HTML5 are listed below (not all of them are listed as impossible):
1. The HTML5 standard is still in development
The first difference is obvious, but very important, and I need to start with it first. Maybe you've noticed that cool talk about HTML5 is everywhere, but the fact is, HTML5 is a standard that hasn't been done yet. HTML4 has been 10 years old, but it is still the current formal standard of fact unchanged.
On the other hand, HTML5 is still in its early stages, and subsequent revisions will continue to emerge. You have to take this into account, because the new additions or modifications you use on the site will change every year, and you'll need to keep updating your site, which is not what you want. This is the reason why, so far, you'd better use HTML4 in your product, just use HTML5 in your experiment.
2. Simplified syntax
A simpler DOCTYPE statement is one of many new features in HTML5. Now all you have to do is write <!doctype html> The HTML5 syntax is compatible with HTML4 and XHTML1, but is not compatible with SGML.
3. A new <canvas> tag that replaces 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 for generating video with new <canvas> tags has arrived.
Currently, the <canvas> tag does not provide all the features that Flash has, 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 is designed to better depict the anatomical structure of the site. That's why these The advent of new tags such as <footer>, which are specifically designed for these parts of the logo website.
When developing a Web site, you do not need to use the <div> tag to label these parts of the page.
5. New <section> and <article> marks
Like the
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.
Similarly, 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 old Web2.0.
8. New Form Design
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 10 main differences between HTML4 and HTML5