File Under: HTML

Document Type Declaration

Every web page must declare a document type, or “DOCTYPE”. This line of code begins an HTML document and tells a validator what version of HTML or XHTML to use when checking the syntax and structure of the document for errors.

Doctype declarations, known as DTDs, go at the very beginning of your document, above the <head> tags.

Here are some of the most common DTDs.

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"


XHTML 1.0 Frameset:

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


HTML 4.01 Transitional:

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


HTML 4.01 Strict:



HTML 4.01 Frameset:

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


HTML5 (which is not yet a standard)

<!DOCTYPE html>