visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Web :: Browser issues :: what is "quirksmode" ? quirks mode ? why ?


By: Josdeveld Belgium  Date: 26/04/2006 09:28:58  English  Points: 20 Status: Answered
Quality : Excellent
why is there such a "mode", and how to know why a browser would enter into this mode in stead of the "standards compliant mode" ?!?

Is this a new microsoft "feature" of their "browser" ?
By: VGR Date: 26/04/2006 10:06:31 English  Type : Answer
Salut :D

The "quirks mode" applies to IE version 6 (of course :/ ) but also to modern browsers. The reason why it does exist is that for years bad habits have been used on (D)HTML coding and the browsers, althought obeying W3C standards now, still want to be able to render that old invalid code.

So the "quirks mode" is in fact a non-standard behaviour built into user agents so that they render pages "looking good anyway".

Now as for the "how" :
If a browser sees a full DTD as the FIRST element of a document, including the W3C URL for the details, then it renders the page in "standards" mode.

But if a browser sees no DTD, or a partial DTD, then it goes into "quirks mode", which essentially means rendering the page the wrong way, but the way we were used to.

This applies of course to Internet Exploder, but also to Mozilla/Moz Firefox and all other modern real browsers like Opera and such.

Some details for Mozilla are here for Quirks mode and here for DOCTYPE recognition

An example of a valid DOCTYPE is :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



Other valid DOCTYPES are available at the W3C site and this is the recommended list

regards

Do register to be able to answer

EContact
browser fav
page generated in 335.038900 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page