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

In-depth analysis of the Linux kernel macro container_of

1. As mentioned above I saw this macro when I was...

How to make React components full screen

introduce This article is based on React + antd t...

CSS form validation function implementation code

Rendering principle In the form element, there is...

nuxt.js multiple environment variable configuration

Table of contents 1. Introduction 2. Scenario 3. ...

Implementation of building custom images with Dockerfile

Table of contents Preface Introduction to Dockerf...

jQuery implements the drop-down box for selecting the place of residence

The specific code for using jQuery to implement t...

React+ts realizes secondary linkage effect

This article shares the specific code of React+ts...

Linux/Mac MySQL forgotten password command line method to change the password

All prerequisites require root permissions 1. End...

How to restore single table data using MySQL full database backup data

Preface When backing up the database, a full data...

Vue el-date-picker dynamic limit time range case detailed explanation

There are two situations 1. Start time and end ti...

Simple steps to create a MySQL container with Docker

Preface We have already installed Docker and have...

CSS to achieve Cyberpunk 2077 style visual effects in a few steps

background Before starting the article, let’s bri...

What is the function and writing order of the a tag pseudo class

The role of the a tag pseudo-class: ":link&qu...