The <!DOCTYPE> declaration should always be included at the top of the HTML document, before the <html> tag.

See http://stackoverflow.com/documentation/html/806/doctypes/16623/html-5-doctype for details on the HTML 5 Doctype.

<!DOCTYPE html>

See http://stackoverflow.com/documentation/html/806/doctypes/3148/html-4-01-doctypes for details on how these types differ from each other.


Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "<http://www.w3.org/TR/html4/strict.dtd>">

Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<http://www.w3.org/TR/html4/loose.dtd>">

Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "<http://www.w3.org/TR/html4/frameset.dtd>">