Home > Web Front-end > Front-end Q&A > There are several types of html doctypes

There are several types of html doctypes

青灯夜游
Release: 2023-01-06 11:17:27
Original
2609 people have browsed it

There are 8 types: 1. HTML5 version; 2. HTML 4.01 strict version; 3. HTML 4.01 transitional version; 4. HTML 4.01 framework version; 5. XHTML 1.0 strict version; 6. XHTML 1.0 transitional version; 7. XHTML 1.0 framework version; 8. XHTML version 1.1.

There are several types of html doctypes

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

The declaration is placed first in the document, before the tag. The

declaration is not an HTML tag; it is used to tell the web browser which version of HTML is used for the page.

Common DOCTYPE declaration

HTML 5

<!DOCTYPE html>
Copy after login

HTML 4.01 Strict ( Strict)

This DTD contains all HTML elements and attributes, but does not include presentational or obsolete elements (such as font). Framesets are not allowed.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Copy after login

HTML 4.01 Transitional

This DTD contains all HTML elements and attributes, including presentational or obsolete elements (such as font). Framesets are not allowed.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Copy after login

HTML 4.01 Frameset

This DTD is the same as HTML 4.01 Transitional, but allows the use of frameset content.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
Copy after login

XHTML 1.0 Strict

This DTD contains all HTML elements and attributes, but does not include presentational or obsolete elements (such as font). Framesets are not allowed. The structure must be written in standard format XML.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Copy after login

XHTML 1.0 Transitional

This DTD contains all HTML elements and attributes, including presentational or obsolete elements (such as font). Framesets are not allowed. The structure must be written in standard format XML.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Copy after login

XHTML 1.0 Frameset

This DTD is the same as XHTML 1.0 Transitional, but allows the use of frameset content.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
Copy after login

XHTML 1.1

This DTD is the same as XHTML 1.0 Strict, but allows you to add modules (such as ruby ​​support for East Asian languages).

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Copy after login

Recommended tutorial: "html video tutorial"

The above is the detailed content of There are several types of html doctypes. 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