HTML tag

(*-*)浩
Release: 2019-09-16 15:01:09
Original
2448 people have browsed it

All browsers support the declaration.

HTML <!DOCTYPE> tag

Definition and Usage

The declaration must be the first line of the HTML document, located in < before the ;html> tag. (Recommended study: HTML Getting Started Tutorial)

declaration is not an HTML tag; it is an instruction that instructs the web browser about which HTML version to use for writing the page.

In HTML 4.01, the declaration references a DTD because HTML 4.01 is based on SGML. A DTD specifies the rules for a markup language so that browsers can render content correctly.

HTML5 is not based on SGML, so there is no need to reference a DTD.

Tip: Always add the declaration to your HTML document so the browser knows the document type.

Differences between HTML 4.01 and HTML5

There are three types of declarations in HTML 4.01. There is only one in HTML5:

<!DOCTYPE html>
Copy after login

Instance

<!DOCTYPE html>


文档的标题


文档的内容......

Copy after login

The above is the detailed content of HTML tag. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template