! Doctype (document type definition followed by HTML documents (DTD ))

Source: Internet
Author: User

Syntax HTML top-level element availability "Registration/organization/type tag // Definition Language" "url"

Possible Value

The top-level element specifies the type of the top-level element declared in the DTD. This corresponds to the declared SGML document type. HTML default. HTML.

Availability specifies whether the FPI is a publicly accessible object or a system resource. Public default. Publicly accessible objects.
System resources, such as local files or URLs.

Registration specifies whether an organization is registered by the International Standardization Organization (ISO. + Default. The organization name is already registered.
-The organization name is not registered. The Internet Engineering Task Group (IETF) and the World Wide Web Association (W3C) are not registered ISO organizations.

The organization is specified to indicate the owner! Doctype declares the name of the group or organization that creates and maintains the referenced DTD, that is, ownderid. IETF.
W3C.

Type specifies the public text class, that is, the referenced object type. Default DTD. DTD.

The tag specifies the description of the public text, that is, the unique descriptive name of the referenced public text. The version number can be included later. HTML default. HTML.

Define the specified document type definition. Frameset framework set documentation.
Strict exclude representative attributes and elements that W3C experts want to gradually remove because style sheets are well-developed.
Transitional contains all content except the frameset element.

The language specifies the public text language, that is, the natural language encoding system used to create the referenced object. The language definition has been written in the ISO 639 language code (two uppercase letters ). En by default. English.

The URL specifies the location of the referenced object.

Note

This statement must appear at the beginning of the document and before the HTML Tag.

! The doctype element does not need to disable tags.

This element is available in the HTML of Microsoft Internet Explorer 3.0.

You can use this statement to switch to a strict standard compatibility mode in Internet Explorer 6 and later versions. If you want to enable this function, please include it at the top of your document! Doctype Declaration: Specifies a valid tag in the Declaration. In some cases, you also need to specify the definition and/or URL. The following table lists the switches in the standard compatibility mode. Doctype: the URL does not contain the URL.
Doctype disabled
HTML (no version) off
HTML 2.0
HTML 3.0
Open HTML 4.0
HTML 4.0 frameset Enabled
HTML 4.0 transitional
Open HTML 4.0 strict
Open XHTML
Open XML
Open unrecognized doctype

Note that in standard compatibility mode, compatibility with other versions of Internet Explorer cannot be guaranteed. When the standard compatibility mode is enabled, the rendering behavior of the document may be different from that of the future version of Internet Explorer. If the content is fixed (for example, burned on a CD), this mode should not be used.

Example
The following example demonstrates how to use it! Doctype declares the DTD that the document complies with and switches Internet Explorer 6 and later to the standard compatibility mode.

The declaration in the following example specifies the compliance with the HTML 4.0 DTD. The second statement specifies "strict ". The first declaration is not specified. Both declarations will switch Internet Explorer 6 and later versions to the standard compatibility mode.
<! Doctype HTML public "-// W3C // dtd html 4.0 // en">
<! Doctype HTML public "-// W3C // dtd html 4.0 strict // en">

The declaration in the following example specifies that the object complies with the "Transitional" HTML 4.0 DTD. The second declaration specifies the dtd url. The first declaration is not specified. The second statement will switch Internet Explorer 6 and later versions to the standard compatibility mode. The first statement does not.
<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en"
Http://www.w3.org/TR/html4/loose.dtd>

Standard Information

This object is defined in HTML 3.2.

Since most Web documents must comply with an internationally recognized web standard published by W3C, these documents usually contain one of the following standard doctype statements:

HTML 2:

<! Doctype HTML public "-// IETF // dtd html 2.0 // en">

In HTML 3.2:

<! Doctype HTML public "-// W3C // dtd html 3.2 final // en">

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>

In addition to the doctype declaration listed above, some documents with special requirements also use several other declarations.

The doctype declaration is usually the first line of the document, which must be prior to the <HTML> mark and other document content. Note: In the XHTML document, an XML Processing Command (also known as XML Prolog) appears occasionally before doctype ):

<? XML version = "1.0" encoding = "UTF-8"?>

To ensure that the webpage is correctly displayed and successfully verified, it is critical to use the correct doctype. Doctype, which is opposite to the content, incorrect, or incorrectly formatted, is the culprit of many problems. In future columns, I will also explain how to diagnose and correct these problems.

When designing a webpage with DW, create a new file and see the following stuff at the beginning of the Code,
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en"
Http://www.w3.org/TR/html4/loose.dtd>

Syntax HTML top-level element availability "Registration/organization/type tag // Definition Language" "url"

The value of the top-level element specifies the type of the top-level element declared in the DTD. This corresponds to the declared SGML document type. HTML default. HTML.

Availability specifies whether the FPI is a publicly accessible object or a system resource. Public default. Publicly accessible objects.
System resources, such as local files or URLs.

Registration specifies whether an organization is registered by the International Standardization Organization (ISO. + Default. The organization name is already registered.
-The organization name is not registered. The Internet Engineering Task Group (IETF) and the World Wide Web Association (W3C) are not registered ISO organizations.

The organization is specified to indicate the owner! Doctype declares the name of the group or organization that creates and maintains the referenced DTD, that is, ownderid. IETF.
W3C.

Type specifies the public text class, that is, the referenced object type. Default DTD. DTD.

The tag specifies the description of the public text, that is, the unique descriptive name of the referenced public text. The version number can be included later. HTML default. HTML.

Define the specified document type definition. Frameset framework set documentation.
Strict exclude representative attributes and elements that W3C experts want to gradually remove because style sheets are well-developed.
Transitional contains all content except the frameset element.

The language specifies the public text language, that is, the natural language encoding system used to create the referenced object. The language definition has been written in the ISO 639 language code (two uppercase letters ). En by default. English.

The URL specifies the location of the referenced object.

Note

This statement must appear at the beginning of the document and before the HTML Tag.

! The doctype element does not need to disable tags.

This element is available in the HTML of Microsoft Internet Explorer 3.0.

You can use this statement to switch to a strict standard compatibility mode in Internet Explorer 6 and later versions. If you want to enable this function, please include it at the top of your document! Doctype Declaration: Specifies a valid tag in the Declaration. In some cases, you also need to specify the definition and/or URL. The following table lists the switches in the standard compatibility mode. Doctype: the URL does not contain the URL.
Doctype disabled
HTML (no version) off
HTML 2.0
HTML 3.0
Open HTML 4.0
HTML 4.0 frameset Enabled
HTML 4.0 transitional
Open HTML 4.0 strict
Open XHTML
Open XML
Open unrecognized doctype

Note that in standard compatibility mode, compatibility with other versions of Internet Explorer cannot be guaranteed. When the standard compatibility mode is enabled, the rendering behavior of the document may be different from that of the future version of Internet Explorer. If the content is fixed (for example, burned on a CD), this mode should not be used.

Example
The following example demonstrates how to use it! Doctype declares the DTD that the document complies with and switches Internet Explorer 6 and later to the standard compatibility mode.

The declaration in the following example specifies the compliance with the HTML 4.0 DTD. The second statement specifies "strict ". The first declaration is not specified. Both declarations will switch Internet Explorer 6 and later versions to the standard compatibility mode.
<! Doctype HTML public "-// W3C // dtd html 4.0 // en">
<! Doctype HTML public "-// W3C // dtd html 4.0 strict // en">

The declaration in the following example specifies that the object complies with the "Transitional" HTML 4.0 DTD. The second declaration specifies the dtd url. The first declaration is not specified. The second statement will switch Internet Explorer 6 and later versions to the standard compatibility mode. The first statement does not.
<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en"
Http://www.w3.org/TR/html4/loose.dtd>

Standard Information

This object is defined in HTML 3.2.

Since most Web documents must comply with an internationally recognized web standard published by W3C, these documents usually contain one of the following standard doctype statements:

HTML 2:

<! Doctype HTML public "-// IETF // dtd html 2.0 // en">

In HTML 3.2:

<! Doctype HTML public "-// W3C // dtd html 3.2 final // en">

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>

In addition to the doctype declaration listed above, some documents with special requirements also use several other declarations.

The doctype declaration is usually the first line of the document, which must be prior to the <HTML> mark and other document content. Note: In the XHTML document, an XML Processing Command (also known as XML Prolog) appears occasionally before doctype ):

<? XML version = "1.0" encoding = "UTF-8"?>

To ensure that the webpage is correctly displayed and successfully verified, it is critical to use the correct doctype. Doctype, which is opposite to the content, incorrect, or incorrectly formatted, is the culprit of many problems. In future columns, I will also explain how to diagnose and correct these problems.

When designing a webpage with DW, create a new file and see the following stuff at the beginning of the Code,
<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en"
Http://www.w3.org/TR/html4/loose.dtd>

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.