Discuss: Fix Your Site With the Right DOCTYPE!
by Jeffrey Zeldman
- Editorial Comments
2 IE6.x
IE6 triggers quirks mode if there is an XML declaration present. It requires the XHTML doctype to be the very first line to trigger standards mode.
posted at 09:33 pm on April 11, 2002 by riffola
3 whoops. . .
Copied directly from the article:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN”>
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd”>
Should that have the ‘>’ after //EN” ? Looks like a typo, correct version at http://www.w3.org/TR/xhtml1/#normative (only the > is different). Great article as always!
Some other good DOCTYPE resources:
http://www.oreillynet.com/pub/a/network/2000/04/14/doctype/
http://developer.apple.com/internet/html/doctype.html
http://www.meyerweb.com/eric/dom/dtype/dtype-grid.html
http://www.people.fas.harvard.edu/~dbaron/mozilla/quirklist (Good info about Mozilla quirks)
Straight from the source:
http://mozilla.org/docs/web-developer/quirks/ (I got a laugh out of some of the public identifiers :)
http://msdn.microsoft.com/workshop/author/css/overview/cssenhancements.asp
http://lxr.mozilla.org/seamonkey/source/layout/html/document/src/quirk.css (Mozilla’s quirks stylesheet! Gotta love the irony.)
posted at 10:00 pm on April 11, 2002 by Matthew Mullenweg
4 XML
> IE6 triggers quirks mode if there is an XML declaration present.
You’ve got to be kidding me. Is this seriously the case? Doesn’t the standard REQUIRE the XML declaration at the top, above the DOCTYPE tag? So, once again we’re thrown into the sitation of having to either write documents that comply with the standards or documents that work in popular browser, but we can’t have both at the same time. Sigh.
posted at 10:36 pm on April 11, 2002 by sharding
5 xhtml 1.0 strict
I was playing around with the DTDs. When I used the xHTML strict listed in the article, I get an error stating
“Fatal Error: unrecognized {{DOCTYPE}}; unable to check document” Am I doing something wrong or is this another problem I can blame GW. by the way my site validates as xHTML 1.1. have a nice day!
posted at 11:22 pm on April 11, 2002 by adamd
6 XML
No, the XML declaration is optional, as long as you specifiy the page’s character encoding using a Meta tag, the page will be valid XHTML, even XHTML 1.1
posted at 12:28 am on April 12, 2002 by riffola
7 XML
Assuming that the rest of the code is already valid, of course.
posted at 12:29 am on April 12, 2002 by riffola
8 ... yes, but what doctype?
good article – thanks, but I’m still unclear as to which doctype to use. The article lists the doctypes for Strict, Transitional, and Frameset, but what are these? – obviously the type of (X)HTML you’re using – but I’m only clear on what version number I’m using – not Strict, Transitional, or Frameset.
Can anybody enlighten me?
posted at 12:53 am on April 12, 2002 by kr!5
9 Strict, Transitional, Frameset, etc.
Frameset means that the page is a frameset—it doesn’t actually have any content, just frames of other pages.
Transitional is a normal page, but it means that you’re using deprecated (http://www.w3.org/TR/html4/conform.html#deprecated) elements and/or attributes.
Strict is the same as Transitional, but without the deprecated elements/attributes.
posted at 01:06 am on April 12, 2002 by Kevin W
10 gimme gimmie gimme!
So someone clear up what the browser is actually doing when it wants a doctype. Is it actually going out to the URI you state in the doctype, fetching + parsing the information and changing the chartacteristics of it’s rendering because of this? or, is the browser just matching the doctype it sees on the top of your html document to a list of known doctypes it stores and does it that way.
It just seems peculiar that the W3C will allow every single webpage in existence that has a doctype pointed to it to use it’s resouces. Does anyone see the problem with that? (network latency, general download time)
What if, like Netscape did with I believe the RSS doctype, they just decide to move, and tweak it. We’d be quite up the river with no paddle. It also doesn’t make much sense to make web developers to post a doctype locally on a site and make them call the doctype from there. It makes something that should be soooo simple much too complex.
Viddying the doctype itself doesn’t really shed much light on what it actually does.
sort of odd that HTML 4.01 would have a doctype, since aren’t doctypes one of those XML things? :)
posted at 01:12 am on April 12, 2002 by justin simoni
Discussion Closed
New comments are not being accepted, but you are welcome to explore what people said before we closed the door.
Got something to say?
Discuss this article. We reserve the right to delete flames, trolls, and wood nymphs.
Create a new account or sign in below if you’d like to leave a comment.
Subscribe to this article's comments: RSS (what’s this?)






1 Finally!
Great article! I’ve been searching the W3C and other sites for this information to no avail. Keep up the good work.
posted at 09:18 pm on April 11, 2002 by Dave Robbins