Using Proper DOCTYPE to Fix Browser Compatibility Issues
Firefox's growing market share provides just one strong argument among many for not designing for a single browser anymore. But how compatible is your website, and what can you do to make it work better with a variety of browsers? Anthony Hart explains the dangers of outdated DOCTYPE, and how to avoid them.
Using Proper DOCTYPE to Fix Browser Compatibility Issues - Stop Beating Yourself Up and Read (Page 2 of 4 )
To establish a foundation of understanding, DOCTYPE, which is short for document type declaration, informs the validator which version of XHTML you have used, which must appear at the top of every Web page. Please note: DOCTYPE’s are key components that compliant Web pages must have in order to be read by those latest browsers mentioned above. According to The Beginner’s Guide to Creating DOCTYPE, here are the three most common usage of this declaration:
HTML 4.01 Strict Document Type Definition DTD: This version includes all elements and attributes that have not been deprecated or do not appear in the frameset documents. Here is the example to illustrate what I am referring to:
<!DOCTYPE HTML PUBLIC "-W3C//DTD HTML 4.01//EN" "http://www.art.org/TR/html4/strict.dtd">
HTML 4.01 Transitional DTD: Includes everything in the strict DTD plus deprecated elements and attributes. Here is an example to demonstrate what I am referring to:
<!DOCTYPE HTML PUBLIC "-W3C//DTD HTML 4.01 Transitional//EN" "http://www.art.org/TR/html4/loose.dtd">
HTML 4.01 Frameset DTD: Includes DTD and any entity. Again, here is an example that will explain this concept more clearly:
<!DOCTYPE HTML PUBLIC "-W3C//DTD HTML 4.01 Frameset//EN" "http://www.art.org/TR/html4/frameset.dtd">