Home  >  Article  >  Web Front-end  >  There are several types of html doctypes

There are several types of html doctypes

青灯夜游
青灯夜游Original
2021-06-15 15:19:582562browse

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.

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

1a309583e26acea4f04ca31122d8c535 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>

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">

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">

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">

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">

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">

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">

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">

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!

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