Home  >  Article  >  Web Front-end  >  What is the difference between HTML and HTML5?

What is the difference between HTML and HTML5?

Guanhui
GuanhuiOriginal
2020-06-12 14:28:345314browse

What is the difference between HTML and HTML5?

What is the difference between HTML and HTML5?

1. HTML does not have tags that reflect structural semantics, but HTML5 has many semantic tags;

HTML: There are no tags that reflect structural semantics. We usually The

<div id="header"></div>

named in this way represents the head of the website.

HTML5: It has great advantages in semantics. Some new html5 tags are provided, such as:

<header> 、<nav>、<article>、<aside>、<footer>

2. HTML is a plain text language, and HTML5 can make document declarations, which is beneficial for developers to quickly read and develop.

HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

HTML5:

 <!DOCTYPE html>

It can be seen from the comparison between the two: in the document declaration, html has a long section of code, and it is difficult to remember this This piece of code must be generated directly by many people using tools, right? But html5 is different. It only has simple declarations, which is also easier for people to remember and is more streamlined.

Recommended tutorial: "HTML Tutorial"

The above is the detailed content of What is the difference between HTML and HTML5?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn