Document type of HTML: <! DOCTYPE >

Source: Internet
Author: User
Tags deprecated

<! Doctype> declares that it is not an HTML tag and is not sensitive to capitalization, but rather instructs the Web browser about which HTML version the page uses to write the instructions. and the declaration must be the first line in the HTML document, before the

No <!. Consequences of the Doctype> declaration: If there is no document type declaration, most browsers (including IE and Firefox) will be converted to a promiscuous mode in which the same style of the browser will appear inconsistent. When you add a declaration, the browser knows you want to use a stricter standard mode.

The simplest HTML5 documentation:

<! Dovtype HTML > < title > HTML page </title><Div> simplest HTML5 document </  div>

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.

HTML 4.01 Strict: The DTD contains all HTML elements and attributes, but does not include both display and deprecated elements (such as font). Frameset (framesets) is not allowed.

<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD" >

HTML 4.01 Transitionan: The DTD contains all the HTML elements and attributes, including both display and deprecated elements (such as font). Frameset (framesets) is 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 equivalent to HTML 4.01 Transitional, but allows 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 both display and deprecated elements (such as font). Frameset (framesets) is not allowed. tags must be written in well-formed 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 both display and deprecated elements (such as font). Frameset (framesets) is not allowed. tags must be written in well-formed 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 equates to XHTML 1.0 Transitional but allows 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 equivalent to XHTML 1.0 Strict, but allows models to be added (for example, to provide Ruby support for East Asian languages).

<! DOCTYPE HTML Public "-//w3c//dtd XHTML 1.1//en" "Http://www.w3.org/TR/xhtml11/DTD/xhtml11.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.