Dustin Diaz made an interesting discovery to trigger “standards mode” with just a tiny little declaration instead of the regular lengthy one we see everywhere.
As opposed to “standard mode”, there’s this “quirks mode” in IE that accommodates legacy HTML code of no standards at all – rendering them in many different ways compared with standardized HTML who has a harassing top declaration of document type. For example, common HTML document declarations include:
HTML 4.01 Transitional
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
XHTML 1.0 Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
XHTML 1.0 Transitional
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
XHTML 1.0 Frameset
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
For a more detailed collection of HTML doctypes, read here.
However, except for the sake of validation, a declaration usually counts for nothing. The only purpose of leaving one at the top of every web page you create is for the client browser to make the HTML out in standard way rather than in quirks way. Dustin has found a rather convenient short cut for this:
<!doctype html>
It’s much more memorable and correctly triggers the standard mode. We call it the skinny html doctype.
Related Posts
- Best Books of HTML and XHTML to Learn How to Create Web Pages / Sites with HTML and CSS
- The Ultimate On-page SEO Checklist – Better SEO, Semantics and Accessibility at The Same Time
- How to make IE6 to style HTML 5 tags?
- Portable functions for manipulating browser window
- The Ultimate Way to Cloak and Hide any Website Address or URL (Stealth Forwarding)

{ 2 comments… read them below or add one }
cool, since im only starting to learn html, this is way easier.
It actually has become the standard of HTML 5.