[HTML] Doctype

Source: Internet
Author: User

Original link: http://www.jb51.net/web/34217.html

Modern browsers include different rendering modes to support both standard-compliant web pages and Web pages designed for older browsers.

Standards (standard) mode (i.e. strict rendering mode): Used to render web pages that follow the latest standards,

Quirks (inclusive) mode (that is, loose rendering mode or compatibility mode): A Web page designed to render as a traditional browser.

[[[[[[[SGML]

In 1969, IBM developed a document description Language GML (generalized Markup Language) to address different document formats in different systems .

1986 became an international standard (iso8879), which is SGML.

SGML is a document standard for many large organizations, a language-independent, structured, extensible language that makes it popular in many companies and is used to create, process, and publish large amounts of textual information.

]]]]]]]

HTML 2:<! DOCTYPE HTML PUBLIC "-//ietf//dtd HTML 2.0//en" >

HTML 3.2:<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 3.2 final//en" >

[Top-level elements] [available for public access] [Registration//organization//type tag//definition language] [Location of referenced objects]

HTML 4.01 strict:<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "http://www.w3.org/TR/html4/strict.dtd" >

HTML 4.01 transitional:<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "http://www.w3.org/TR/html4/loose.dtd" >

HTML 4.01 frameset:<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 frameset//en" "http://www.w3.org/TR/html4/frameset.dtd" >

XHTML 1.0 strict:<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >

XHTML 1.0 transitional:<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd">

XHTML 1.0 frameset:<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 frameset//en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd ">

XHTML 1.1:<! DOCTYPE HTML PUBLIC "-//w3c//dtd XHTML 1.1//en" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >

XHTML 1.1 plus MathML plus svg:<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//en" "http://www.w3.org/2002/04/xhtml-math-svg /xhtml-math-svg.dtd">

Specifies the document type definition (DTD) that the HTML document follows.

Microsoft? What's new in Internet Explorer 6. You can use this statement to switch Internet Explorer 6 and later versions to standard compatibility mode.

Grammar

HTML top-level element Availability "registration//organization//Type label//Definition Language" "URL"

Possible values

Top-level element: Specifies the top-level element type declared in the DTD. This corresponds to the declared SGML document type. HTML default. Html.

Availability: Specifies whether an official public identifier (FPI) is a publicly accessible object or a system resource. Public default.  Objects that are publicly accessible. system resources, such as local files or URLs.

Registration: Specifies whether the organization is registered by the International Organization for Standardization (ISO). + Default. The organization name is registered. -The organization name is not registered. The Internet Engineering Task Force (IETF) and the World Wide Web Association (WWW) are not registered ISO organizations.

Organization: Designation indicates responsibility by! DOCTYPE declares the name of the group or organization that references the creation and maintenance of the DTD, namely Ownderid. IETF IETF. .

Type: Specifies the public text class, which is the object type being referenced. DTD default. Dtd.

Label: Specifies the public text description, which is a unique descriptive name for the referenced exposed text. The version number can be attached later. HTML default. Html.

Definition: Specifies the document type definition. Frameset the frameset document. Strict excludes all the representative attributes and elements that all the experts want to phase out because the stylesheet is well-established. Transitional contains all the contents except for the FrameSet element.

Language: Specifies the public text language, which is the natural language encoding system used to create the referenced object. The language definition has been written as an ISO 639 language code (uppercase two letters). EN default. English.

URL: Specifies the location of the referenced object.

Note:

1, <! The doctype> declaration must be the first line in the HTML document, before the

2. In HTML 4.01, <! The doctype> declaration references a DTD because HTML 4.01 is based on SGML. The DTD prescribes the rules of the markup language so that the browser renders the content correctly.

3. HTML5 is not based on SGML, so it is not necessary to refer to DTDs.

4. Always add <! to your HTML document Doctype> declaration so that the browser can learn the document type.

[HTML] Doctype

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.