Comment: HTML5 is the latest HTML standard. Redeveloping an HTML5 website is much easier than migrating a website from HTML4 to HTML5, because there are big differences between the two versions
HTML5 is the latest HTML standard. Sooner or later, all web programmers will find that it is necessary to use this latest standard. Moreover, many people will feel that redeveloping an HTML5 website is much easier than migrating a website from HTML4 to HTML5, because there are big differences between the two versions.
In fact, HTML5 does not make any major changes to HTML4, many of them are similar.
However, there are some very important differences you need to know. The following are some of the main differences between HTML4 and HTML5 (not all, it is impossible to list them all):
1. HTML5 standard is still being formulated
This one difference is obvious, but it's very important, I need to start with it first. Maybe you've noticed that HTML5 is cool everywhere, but the truth is that HTML5 is an unfinished standard. HTML4 is already 10 years old, but the fact that it is still the current formal standard has not changed.
On the other hand, HTML5 is still in its early stages, and future modifications will continue to appear. You have to consider this because the newly added or modified web elements you use on the website will change some time each year, and you need to constantly update and upgrade your website, which is not what you want. This is why you're better off using HTML4 in your product and only using HTML5 in your experiments so far.
2. Simplified syntax
A simpler doctype declaration is one of many new features in HTML5. Now you just need to write <!doctype html>, and that's all. HTML5's syntax is compatible with HTML4 and XHTML1, but is not SGML compatible.
3. A new <canvas> tag that replaces Flash
For web users, Flash is both a surprise and a pain. Many web developers are very dissatisfied with the threat HTML5 has posed to Flash. But for those who are enduring bloated Flash videos that take years to load and run, the technology to generate videos with new <canvas> tags has arrived.
At present, the <canvas> tag cannot provide all the functions that Flash has, but in time, Flash will definitely be eliminated from the web. Let's wait and see, because many people still don't agree with this view.
4. New <header> and <footer> tags
HTML5 is designed to better describe the anatomy of a website. That's why these <header> and
New marks such as <footer> are introduced, designed specifically for these parts of the website.
When developing a website, you no longer need to use the <div> tag to mark these parts of the web page.
5. New <section> and <article> tags
Similar to the <header> and <footer> tags, the new <section> and <article> tags introduced in HTML5 allow developers to better label these areas on pages.
It is speculated that in addition to making the code more organized, it can also improve SEO results and make search engines easier to analyze your pages.
6. New <menu> and <figure> tags
The new <menu> tag can be used as a normal menu or on toolbars and right-click menus, although these things 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 stylesheets to control text and images, but using this tag built into HTML5 is more suitable.
7. New <audio> and <video> tags
The new <audio> and <video> tags are probably the two most useful things added in HTML5. Just like 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 was widely accepted, Web2.0 was still the old Web2.0.
8. Brand new form design
The new <form> and <forminput> tags have completely new modifications to the original form element, and they have many new attributes (and some modifications). If you develop forms frequently, you should take the time to study them in more detail.
9. No longer use <b> and <font> tags
For me personally, this is a change that I don't understand very much. I don't think how much benefit it will be to remove <b> and <font> marks. I know that the official guidance says that these markers can be handled better through CCS, but in this way, in order to appear in one or two places of the article, you need to implement this function in independent css and text, which is not clumsy. Maybe we will get used to this method in the future.
10. No longer use <frame>, <center>, <big> tags
In fact, I can't remember when these marks have been used, so I don't feel sad about removing them. For the same reason, there are better markers that can implement their functionality - which is good, any invalid markers are welcome to be removed from the standard.
The differences between these 10 HTML5 and HTML4 are just a small part of the entire new specification. In addition to these major changes, I can also mention some minor changes, such as modifying the attributes of the <ol> tag to enable it to be sorted in reverse, and modifying the <u> tag.
All these minor changes are numerous. And new changes are also increasing, so if you want to track the latest trends in real time, you need to frequently view the differences between w3.org's HTML4 and HTML5 this page. If you are anxious and want to use these new tags and attributes in your work, I advise you that it is better to just do experiments. The reason has been made clear that these new tags and attributes may change a lot in the future, so unless you keep updating your code, they are likely to expire and expire.
Although most popular browsers today support HTML5, some new (or modified) tags and properties do not support them, so your page may be inconsistent on the user's screen. Wait patiently and wait for when HTML5 can be really useful. It's not the time yet.