How can I manually enable the quirks or almost standards modes for an HTML file?

228 views Asked by At

Removing the doctype declaration or adding a comment before it aren't helping. From what I've seen, If I switch to IE7 or below from the inspector in IE, it displays the page in quirks mode. But why won't removing the doctype do the trick in any browser?

2

There are 2 answers

1
Deepak-MSFT On

There are different document types.

You can try to refer to the table in the link below and try to use the Doctype according to its description may help you to load the page in quirk or standard mode in the specific browser.

Comparison of document types

Another helpful reference:

Quirks mode

0
Alohci On

The Mode of the document is fixed by the parser as it parses the HTML. Subsequently alterations to the document's contents won't change the mode.

The only way to get a differently moded document is create a new document by re-parsing the contents with the altered HTML.