kinda started asking this in another thread, but don't want to derail it.
We discussed that the <xml> prologue throws IE into quirksmode, so best to leave it out. But upon some google searches many sites say it is best form to put it in (when using DTD strict I assume)
But if it causes unpredictable behaviour in browsers, then what instance would I actually consider using the <xml> prologue that would benefit me?
Re: <xml> prologue
what instance would I actually consider using the <xml> prologue that would benefit me?
ah yes... I see again, the dreaded IE comprimises we all have to make.
It is meant to be used when writing an Xhtml document, but it is not strictly required, when serving up xhtml as mime type text/html it is perfectly acceptable to drop it from use as it will not effect standards Switching, this is as discussed on W3C and to which I posted a link to very recently.
It is therefore dropped due to the fact that content before the DTD will trip up IE.
I know this goes against the grain in these forums. But I do recall reading (and it made some sense to me at the time) that using the XML prolog and leaving IE6 in quirks mode may not be a bad thing --- if you are going to ensure your design works correctly with IE5. After all if its going to work in IE5 it will work unchanged in IE6 quirks mode, so there is no need to bother with IE6 no quirks.
If however you are prepared to your page to degrade gracefully under IE5 then I guess you are better off without the prolog. Its the sort of decision that should be taken "eyes open" - when you understand the consequences of both choices. For those that don't understand the issues "no prolog" is a whole lot more sensible than "prolog".
Hm, that muddies the water on a subject that causes a lot of people confusion, but is a view that has it's merits and does make sense to a large degree, but as you say that is path to take for those that understand the subject and the majority struggle with it .
The idea doesn't go against the grain though Chris, the concern is always primarily working in and coding to Standards, that a certain browser cannot cope with things is it's fault if someone presents work fully formed with prolog, DTD then they are doing there job correctly and to the standards we all harp on about, it's just sad that we have to tell most to remove the prolog in order to solve IE quirkiness.
I would still recommend that people leave it out and work with IE in standards mode and make the allowances for IE5 in quirks.
Since it is easy to code around the box-model problem (e.g. by not using padding or margins on fixed-width 'holding' divs, but using them on images and paragraphs inside the divs instead), I would agree with Hugo. Adding the odd additional hack for IE5 is simpler (to my mind) than having to deal with both IE5 and IE6 in quirks mode.