Understanding How DocType Switching Works

The most recent CSS-compliant browsers, Internet Explorer 5 for the Macintosh, Internet Explorer 6, and Netscape 6, support what is generally referred to as DocType switching. With DocType switching, a browser actually supports two compatibility modes: a quirks mode and a standards mode. This allows the most current browsers to be fully compliant with the latest HTML and CSS standards, while remaining backward compatible with pages coded to be displayed in earlier, less than fully standards- compliant, Web browsers.

DocType switching is designed to overcome the following problems:

  • Web pages coded to display in earlier less than fully standards- compatible browsers may not display well, or at all, in later ...

Get Cascading Style Sheets (CSS) by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.