Stop Quirkiness - Use a proper doctype

I found myself for a third time this month having to google for doctype definitions, so I’m listing them here for reference.

One of the most common causes of IE-related quirkiness is failure to use a proper doctype. This throws IE into Quirks mode…a mode designed to help old, non-compliant docs still render nicely. The downside is it can cause proper code to act, well, quirky.

Use a proper doctype! Then you’ll just have to handle IE’s less-quirky, more annoying traits.

HTML 4.01 Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "">

HTML 4.01 Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

HTML 4.01 Strict


XHTML 1.0 Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "">

XHTML 1.0 Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

XHTML 1.0 Strict

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">

Add Your Comment