Do you remember that old age, HTML3 is regarded as a kind of magical thing that can only run in Netscape? Yes, that's the beginning of the dawn of the internet age. We certainly do not forget that history, but it is reasonable to say goodbye to some good but old things (especially when they are not currently considered so useful, or when no one is paying attention to them).
As a result, HTML5 's designers have abolished some old tags, because they are only used by the HTML geeks, and because they are completely useless, the new HTML tags will no longer include them – and I think we should thank these designers for this. After all, these marks are so old that it can be imagined that 20 years from now our children will think that only Shakespeare will be used in his 14 lines of poetry. Anyway, let's take a look at them in the Internet museum (is there really such a museum?). )。
These tags are basically useless (you might think that there are several markers that are somewhat similar to the new ones in the HTML5). Some of them have been used in earlier versions of the browser, but have now lost their role, while others have been replaced with CSS functionality (such as setting fonts and Text style tags).
Replacing the <div> tag with the new tag is a major semantic achievement of HTML5. This <div> tag is an important (and now still) marker in HTML4, which is widely used in HTML, but it is too weak to express, and it is useless in the face of the task of declaring a different chunk of the page's structure. New HTML5 tags – such as <article>, <aside>, <nav>, <figure>, , <footer> -will be more useful and convenient, these tags will allow you to specify the purpose of different areas of the Web page, clearly show the structure of the site. This means that even if you're a novice or a middle-class programmer, you can clearly understand the structure of the entire page based on HTML code-and it's worth mentioning that search engines will be thrilled to be able to parse the structure of the page so easily.
What good is it to us?There has been a lot of discussion about the value of new tags and semantics, and some people think that these semantics and visual representation do not make any sense-because they bring more complex code and create the opportunity to use these new HTML code for new mistakes. The value of HTML5 's new semantics is to enhance the level of interaction and collaboration between Web users and these technologies, which is why the Internet is moving forward.
The same is true – we should understand that, just as HTML5 gives us the feeling of being so cool, people have put a lot of effort into it and have great hopes for the development of the Internet over the next 5 years. Today, these new tags and semantics look really great, and we all like it, but remember that everything is changing to suit people's needs, that new language features must depend on people's use and the vast use of the Internet community-only in this way can the simple new things become useful new things.
10 main differences between HTML4 and HTML5 (from http://www.vaikan.com/10-essential-differences-between-html4-and-html5/)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 developmentThe 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 syntaxA 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 flashFor 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> marksLike 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> marksNew <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> marksThe 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 DesignNew <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> marksFor 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> MarkIn 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.
HTML5 study Notes