Doctype definition of the XML file)

Source: Internet
Author: User
ArticleDirectory
    • HTML 4.01 specifications include: strict, transitional, frameset
    • XHTML 1.0 specifications include: strict, transitional, frameset
    • XHTML 1.1 DTD

Common doctype Declaration: according to the following list of HTML 4.01 XHTML 1.0 XHTML 1.1, the incorrect doctype HTML public may lead to page parsing errors.

HTML 4.01 specifications include: strict, transitional, frameset

<! Doctype HTML public "-// W3C // dtd html 4.01 // en" "http://www.w3.org/TR/html4/strict.dtd">

<! Doctype HTML public "-// W3C // dtd html 4.01 transitional // en" "http://www.w3.org/TR/html4/loose.dtd">

<! Doctype HTML public "-// W3C // dtd html 4.01 frameset // en" "http://www.w3.org/TR/html4/frameset.dtd">

XHTML 1.0 specifications include: strict, transitional, frameset

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 strict // en"
Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 frameset // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

XHTML 1.1 DTD

<! Doctype HTML public "-// W3C // dtd xhtml 1.1 // en" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Doctype HTML public Definition
Specify the document type definition (DTD) that HTML documents follow ).
Microsoft ?? New Content of Internet Explorer 6
You can use this statement to switch Internet Explorer 6 and later versions to standard compatibility mode.

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 as ISO 639 non-Microsoft link 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 in Microsoft ?? Internet Explorer 3.0 is available in HTML.

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.




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.




Standard Information

This object is defined in the HTML 3.2 non-Microsoft link.

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.