HTML5 is the next version of the HTML standard. More and more programmers are starting HTML5 to build websites. If you use HTML4 and HTML5 at the same time, you will find it much easier to build from scratch with HTML5 than to move from HTML4 to HTML5. Although HTML5 does not completely subvert HTML4, they still have a lot in common, but they also have some key differences. This article lists the 10 key differences between them.
The 1.HTML5 standard is still under development.
The first thing to note is that although the HTML5 is now very fire, but the HTML5 standards are still in the making, the standards are still changing. HTML4 has been more than 10 years, there will be no change.
2. Simplified syntax
HTML5 simplifies a lot of subtle syntax, such as DOCTYPE's declaration, you just have to write <!doctype html>. HTML5 is compatible with HTML5,XHTML1, but is incompatible with SGML.
3.<canvas> tag instead of Flash
Flash brings trouble to many web developers, and it requires a bunch of code and plugins to play flash on a Web page. <canvas> tags make it possible for developers to interact with the user UI with a single tag. Although the current <canvas> tag can not achieve all the features of Flash, but soon <canvas> will make flash look old-fashioned, haha!
4. Add
One of the principles of HTML5 design is to better reflect the semantics of the site, so add
5. Add <section> and <article> tags
and
6. Add <menu> and <figure> tags
<menu> can be used to create traditional menus, and also for toolbars and context menus. <figure> labels make the typography of Web pages and images more professional.
7. Add <audio> and <video> tags
These two tags are probably the most useful two tags in HTML5. As the name implies, these two tags are used to play audio and video.
8. A new form
HTML5 has made a lot of changes to <form> and <forminput> tags, added a lot of new properties, and modified many properties.
9. Delete <b> and <font> tags
This improvement is beyond my comprehension. I don't think the removal of these two tags is a great help to the code improvements. The official explanation is that CSS should be used instead of the two tags. But I still feel that for simple text, these two tags are still very convenient.
10. Delete <frame>,<center>,<big> Label
I can't remember the last time I used these tags.
10 key differences between HTML5 and HTML4