What is the role of Doctype? What are the differences between standard (strict) and weird (mixed) modes ?, Doctype Hybrid

Source: Internet
Author: User

What is the role of Doctype? What are the differences between standard (strict) and weird (mixed) modes ?, Doctype Hybrid
What is the role of Doctype? What are the differences between standard (strict) and weird (mixed) modes?The following standard mode and strict mode are collectively referred to as standard mode, while the weird mode and mixed mode are collectively referred to as weird mode. I only want to talk about the problem. I want to know more about the browser. Study the browser development history by myself. Haha. <! DOCTYPE> the Document declaration must be the first line of the HTML document, located before the

<! DOCTYPE html>
Why should I use such a statement?Just define <! DOCTYPE html>, your browser will render the page in standard mode, otherwise it will render the page in weird mode. What is the standard mode and the weird mode?Standard mode: the browser parses and renders pages according to W3C standards. Weird mode: the browser parses and renders pages in its own way. Why is there a weird pattern?In the early days, browsers were not strictly designed to comply with W3C standards for a period of time. In order to be compatible with the web pages generated during this period, a page rendering mode was generated. To differentiate between the old and new web pages, use the doctype document statement. If a Web page does not specify the document type (the old web page does not have the document type at all ), then the browser automatically uses the "weird mode" to render the page, so that the old page can survive normally. If the document type is specified, the rendering will follow W3C standards.

Related Article

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.