Mode of the browser

Source: Internet
Author: User

Early in the IE6, that time the mainstream browser is IE browser, but there are a lot of IE browser specifications are not in line with the specifications, the most significant one is IE box model.

This is our present box model, and the box model of the norm.

However, at that time the IE browser, IE's box model is like this

In IE a big day, ie browser a lot of specifications are based on IE home to set, completely disregard the specifications, slowly with more and more browsers, IE gradually pay attention to the issue of the specification, and then in the new IE6 browser modified, Many of the original non-conforming rendering into the specification, such as the box model mentioned above. But this is a problem, because at that time a lot of web pages are written according to the original IE specifications, so many web pages face IE changes, they have to re-construct the original code, such a workload is very scary. So IE came up with a way, IE6 not only can be in accordance with the new Web site specification rendering page, but also can be backwards compatible, according to the original IE specification rendering. The two modes of rendering are the quirks that we are now talking about (promiscuous mode, English name: Quirks mode), and the standard mode (standards modes). So how can we start these two patterns, and that's what our document statement does,

<! DOCTYPE html>

If our code header declares the DOCTYPE in accordance with the canonical declaration, then it will be parsed as a standard pattern, and if there is no declaration DOCTYPE the page will be parsed as a quirks mode. Look at an example.

The width of this box is 300px,panding to 100px, so the total breadth is 500px, and when we remove the DOCTYPE declaration, it's like this in IE5:

Width becomes 100px, while Pading is 100px, the total width is 300px. So this time the quirks mode is enabled, and then the box model is no longer our box, and becomes the IE box model, further verify the above content.

But here's a question, why is the quirks mode enabled only when IE5? Why is there no change in ie8910?

Mode of the browser

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.