Mary Ellen Curtin wrote: > Only two of these big sites don't even have a doctype: Google and > Amazon. In Google's case I'm guessing it's because they place the > highest priority on fast-loading pages, and they don't want > *anything* in there they don't have to. In Amazon's case I'm inclined > to think it's because the code is an incredible kluge job, put > together over a long period by many hands not all working in the same > direction, and the thought of a doctype just makes the coding dept. > laugh hollowly.
They may laugh because they don't know any better, or because they _do_ know better. Probably the former in most cases. Fact: apart from for validation-reasons, there's no need for a doctype _if_ the styling takes that into account and/or the styling is kept simple enough. When it comes to browsers, only IE needs a doctype... <http://www.gunlaug.no/contents/wd_additions_34.html> Not that I encourage anyone to ditch the doctype, but it is only there for mode-switching purposes. For those who rely on quirks mode rendering and for those who can style mode-independent, the doctype is either in the way or it doesn't really matter much. > What surprises me is how many sites have style codes directly in the > head, either instead of style sheets or in addition to one. Is there > a good reason for this? For some more or less manually created sites/documents it makes sense to link in site-wide styles add page-specific styles in the page-head. I practice this a lot to avoid stylesheets that are full of "used once" styles. Styles in page-head are applied faster than stylesheets first time around, but if page-head styles are repeated over several pages or whole sites they'll slow down the rendering instead simply because the document becomes larger. > And then there's something like MySpace, with linked style sheets in > the head, *and* some styling directly in the head, *and* styles on > individual page elements. Is there any way in which this is a good > thing? Support for very old and very obsolete browsers, maybe. Can't think of any other reason. > or should I stick with my original impression, which is that it's > about what I expect from MySpace. Pretty much so. Myspace also places extreme restrictions on what the individuals can do style-wise and otherwise. > I'm impressed that 3 of these sites pass the validator. I was > expecting it of Wikipedia, but not of MSN or BBC -- it speaks, I > think, to a high level of consistency and discipline in their coding > depts. Achieving validity is the easy part, and it is even easier if one cheats. Not much "valid" _behind_ the <!--[if IE]> comments on the MSN site for instance, and the same trick is used on the BBC and Wikipedia sites. Not that such tricks necessarily degrade a site's code-quality - if it has any, but the fact that such tricks can make the most horrible source-code and/or CSS pass the validator makes validity-checking from the outside - our side - of little use. regards Georg -- http://www.gunlaug.no ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
