10 key differences between HTML5 and HTML4

10 key differences between HTML5 and HTML4

HTML5 is the next version of the HTML standard. More and more programmers are starting to use HTML5 to build websites. If you use both HTML4 and HTML5, you may find that building from scratch with HTML5 is much easier than migrating from HTML4 to HTML5. Although HTML5 does not completely overturn HTML4 and they still have many similarities, they also have some key differences. This article lists 10 key differences between them.

1. HTML5 standards are still being developed

The first thing to note is that although HTML5 is very popular now, the HTML5 standard is still being developed and the standard is still changing. HTML4 is over 10 years old and nothing will change.

2. Simplified syntax

HTML5 simplifies many subtle syntaxes, such as the doctype declaration, you only need to write <!doctype html>. HTML5 is compatible with HTML5 and XHTML1, but is not compatible with SGML.

3.<canvas> tag replaces Flash

Flash has caused trouble for many Web developers. Playing Flash on a web page requires a lot of codes and plug-ins. The <canvas> tag allows developers to interact with users on the UI using just one tag. Although the <canvas> tag cannot realize all the functions of Flash at present, <canvas> will soon make Flash look old-fashioned, haha!

4. Add <header> and <footer> tags

One of the principles of HTML5 design is to better reflect the semantics of the website, so tags such as <header> and <footer> are added to clearly indicate the structure of the web page.

5. Add <section> and <article> tags

Similar to <header> and <footer>, <section> and <article> also help to clarify the structure of the web page and are more conducive to SEO.

6. Add <menu> and <figure> tags

<menu> can be used to create traditional menus, as well as toolbars and context menus. The <figure> tag makes the layout of text and images on a web page more professional.

7. Add <audio> and <video> tags

These two tags may be the two most useful tags in HTML5. As the name suggests, these two tags are used to play audio and video.

8. Brand new form

HTML5 has made a lot of changes to the <form> and <forminput> tags, adding many new attributes and modifying many attributes.

9. Remove <b> and <font> tags

I still don't understand this improvement. I don't think removing those two tags would improve the code much. The official explanation is that CSS should be used to replace these two tags. But I still think these two tags are very convenient for simple text.

10. Delete <frame>, <center>, <big> tags

I can’t remember the last time I used these tags.

The above article briefly discusses the 10 key differences between HTML5 and HTML4. This is all I have to share with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

<<:  Example code for implementing complex table headers in html table

>>:  Vue3 gets the current routing address

Recommend

Detailed explanation of routes configuration of Vue-Router

Table of contents introduce Object attributes in ...

Implementation of Nginx load balancing cluster

(1) Experimental environment youxi1 192.168.5.101...

js realizes the magnifying glass function of shopping website

This article shares the specific code of js to re...

MySQL Daemon failed to start error solution

MySQL Daemon failed to start error solution A few...

Differences and usage examples of for, for...in, for...of and forEach in JS

for loop Basic syntax format: for(initialize vari...

An audio-visual Linux distribution that appeals to audiophiles

I recently stumbled upon the Audiovisual Linux Pr...

jQuery implements time selector

This article example shares the specific code of ...

How to use CSS to center a box horizontally and vertically (8 methods)

Original code: center.html : <!DOCTYPE html>...

Detailed explanation of MySQL's MERGE storage engine

The MERGE storage engine treats a group of MyISAM...

Summary of xhtml block level tags

* address - address * blockquote - block quote * c...

Packetdrill's concise user guide

1. Packetdrill compilation and installation Sourc...