Prev | Current Page 55 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"

A doctype declaration contains the name of the document??™s root element,
and usually, a reference to the document type definition (DTD), which contains the
syntactic rules for the markup language used in the document. Web browsers had
so far ignored the doctype declaration, which was mainly intended for markup
validators.
The process by which a browser chooses a rendering mode based on the doctype
declaration is known as doctype sniffing (or doctype switching), and was first
implemented in Microsoft Internet Explorer 5 for Mac OS. Today, doctype sniffing
is also used in Opera (7 and later), Firefox and other Gecko-based browsers, Safari,
Internet Explorer 6 and 7, and Konqueror (3.2 and later).
If the browser decides that the document is modern, it??™ll render it in standards
mode. This means that, as a rule, CSS is applied in accordance with the CSS2
specification.
If the browser decides that the document is old-school, it??™ll render it in quirks mode.
This mode applies CSS in the quirky way that suited predecessors of that browser,
or even of other browsers.


Pages:
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67