Tag (from: http: // 221.199.150.103/JSJ/html/page/book/XHTML/m_doctype.htm)

Source: Internet
Author: User

<! Doctype> label

Function: <! Doctype> labels are used to declare the language and DTD type of a document.

<! Doctype> A tag is not an HTML Tag. It is located at the beginning of the document and is used to describe the document type and usage specifications. when the document is verified, the system follows the <! Doctype> specifies the specification for verification.

Note: <! Doctype> the tag does not end or need to be closed.

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

The document's root element is declared as HTML, which is defined in the DTD with the public identifier "-// W3C // dtd xhtml 1.0 strict/EN, the browser will understand how to find a DTD that matches this public identifier. If not, the browser uses the URL following the public identifier as the location for searching for the DTD.

Instance 1

Three types of XHTML 1.0 <! Doctype>.

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

Document root element: HTML; language version: XHTML 1.0; DTD type: strict ). You must strictly abide by the XHTML specifications and use them with CSS.

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

Document root element: HTML; language version: XHTML 1.0; DTD type: Transitional (Transitional ). Used by users who do not use CSS.

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

Document root element: HTML; language version: XHTML 1.0; DTD type: frameset (framework set ). This DTD is required for the framework set page.

Instance 2

Three types of HTML 4.01 <! Doctype>.

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

Document root element: HTML, language version: HTML 4.01, and DTD type: strict ). You must strictly abide by the XHTML specifications and use them with CSS.

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

Document root element: HTML, language version: HTML 4.01, and DTD type: Transitional (Transitional ). Used by users who do not use CSS.

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

Document root element: HTML, language version: HTML 4.01, and DTD type: frameset (framework set ). This DTD is required for the framework set page.

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.