What is Quirks Mode and Browser Standards Mode?

Asked

Viewed 587 times

4

Time and again I hear the term Quirks Mode, but I never really understood what it means or what it implies in rendering the HTML / CSS document.

What happens for the page to enter Quirks Mode, and what it takes to ensure that the page is set to the default Standards Mode?

How would I "activate" the Quirks Mode of a document on purpose? Is there any technical reason to let a document in that way?

1 answer

0


In short, the Quirks Mode is a way to emulate the non-standard rendering behaviors of Netscape Navigator 4 and Internet Explorer 5. It has emerged as a way to avoid breaking websites created before the web standards.

The choice of the mode to be used by the browser is given through the DOCTYPE.

The simplest and which ensures the use of Full Standards Mode is the <!DOCTYPE html>.

The use of another DOCTYPE, for example, <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >, may lead to the use of Almost Standards Mode.

The non-use of a DOCTYPE leads to the use of the Quirks Mode.

If you want to know more details about the differences between the modes recommend reading this material https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.