HTML doctypes

I can never remember these things. This is a list so I (or you) can just cut and paste into pages.

HTML 4 transitional:

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

HTML 4 strict:


XHTML transitional:

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

XHTML strict:

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

There’s also a good reference on the W3C site that has an explanation of how to use doctypes and a list of the HTML 4 doctypes you can use.

Posted on 07 Dec 04 by Helen Emerson (last updated on 07 Dec 04).
Filed under Web development