To read all comments associated with this story, please click here.
Ever since version 6, IE has had a "standards-compliant" mode and a "compatibiltiy" mode equivalent to Firefox quirks mode. The quirks mode is basically laid out like IE4, and the standards-compliant mode is supposedly laid out according to web standards, though the actual compliance with those standards has been improving gradually. IE7's standards-compliant mode is actually pretty good - though not all the way there yet, IE7 can render most pages pretty close to the way they would render in Firefox and such.
You have to trigger standards compliant mode by including a proper doctype declaration. There are pages on MSDN that list the doctypes that will trigger it, a pretty long list that includes all modern HTML 4 or XHTML 1 standards.
MSDN changes their linking structure pretty often, but this page seems to work right now: http://msdn2.microsoft.com/en-us/library/ms535242(VS.85).aspx
Edit: Got the initial version wrong (is IE6, not 5).
Edited 2007-12-19 22:57
Both IE AND Firefox have a quirks mode and a standards mode. If you use the correct DOCTYPE and have valid code, they are supposed to render the page according to W3C standards, otherwise they revert to a compatibility mode for older, non valid HTML. There's lots of good reasons for this.
Every browser engine I know has at least two modes:
Standards compliance mode.
Quirks mode.
If a HTML file has a correct header, the browser usually tries to render the HTML file according the specifications in the header (like HTML 4.0 strict etc.). If the renderer detects lots of errors, it falls back into quirks mode. The quirks mode is the really hard part to program in a renderer. It tries to interpret common mistakes by web page authors the way they might have intended it and not how a standard decribes it. The quirks mode is the mode older KHTML versions and iCab lack. That's also the mode Apple vastly improved in WebKit compared to older KHTML releases.
At least Firefox shows you which mode it's using: Use Tools -> Page Info ("General" tab).
With HTML there are a couple of doctypes at the top of the page. There is strict which is usually considered standard mode. Then their is traditional or loose which allows backwards compatibility. This is all dependent on the web developer not personal settings of the browser
Firefox and Opera must be useless then. If you are browsing OSNews in Forefox right click on an empty part of the page, select 'View Page Info'. Look for render mode. You will see it says 'Quirks Mode'. I believe all browsers do this. I like developing in XHTML 1.0 Strict as browsers seem to have the least differences that way. All browsers need to have different modes. If the detect missing, bad or old documents types then they default to the 'quirks' mode. If it is well formed and modern they use the standards compliance mode.






Member since:
2006-10-28
No, seriously, this is great news. MS is actually paying attention to web standards! Web devs cheer!