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"

	  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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 Frameset:

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

      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">


HTML 4.01 Transitional:

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

      "http://www.w3.org/TR/html4/loose.dtd">




HTML 4.01 Strict:


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

      "http://www.w3.org/TR/html4/strict.dtd">


HTML 4.01 Frameset:


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

      "http://www.w3.org/TR/html4/frameset.dtd">


HTML5 (which is not yet a standard)


<!DOCTYPE html>