tags:

views:

75

answers:

1

Hi


a) Book I’m reading claims that browser has two sets of rules (one for old HTML and one for the newer, standard HTML 4.01 ) for displaying web pages and if we don’t tell the browser ( by adding document type definition ) that we are using standard HTML 4.01, then browser will assume we’re writing old HTML and thus will use old set of rules for rendering html.


b) Book also claims that if we tell the browser we are writing standard HTML 4.01 ,but if we then make just one mistake in our markup( typos, mismatched tags… ), then browser will assume we’re writing old HTML and thus will use the old set of rules for rendering html. Is that correct?


c) I don’t understand why due to just one mistake in our markup won’t the browser be able to apply the new set of rules to otherwise perfect HTML 4.01? If nothing else, it could apply old set of rules to the non-valid markup (say a mismatched tag) and new set of rules to the remaining, up-to standard HTML?!


thanx

+5  A: 

Quirks mode -- I think this is what most browsers use if they find errors in the html.

EDIT:

I am by no means an expert on the subject, but it would seem that if a browser is loading a page according to the doctype declaration and encounters invalid markup, then it would need to switch to quirks mode as it is a 'kinder and gentler' rendering. Otherwise, if it is following the rules with markup that doesn't follow the rules so to speak, all sorts of rendering issues could arise.

I don't know of any real numbers but I would guess that the majority of the web renders in quirks mode including many of the major players. Probably a byproduct of the web designer's epic struggle to get pages to render in multiple browsers including non-compliant browsers, like ie6.

See also, a comparison of web browsers

Jim
Yes, book uses this term to describe browsers using old set of rules
carewithl