DTP's Doctype-Declaration (DTD)

Each document has to begin with a doctype-declaration (DTD). It specifies which HTML-Standard will be used. The DTDs, Document Type Definitions, are a consistent part of HTML and XHTML. The doctype is situated at the top of the HTML-file just above the <html> tag.

HTML 5

HTML5 DOCTYPE is not case-sensitive. The following notations are all correct.

<!DOCTYPE html>
<!doctype html>
<!Doctype HTML>

HTML5 is not based on SGML and doesn't require any DTD specifications.

HTML 4.01 Strict, Transitional, Frameset

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

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

Like HTML 4.01, XHTML 1.0 also knows three diffrent types of DTDs. But unlike HTML 4.01 it is absolutely necessary, that each document is introduced by a doctype declaration.

XHTML 1.0 Strict, Transitional, Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

XHTML 1.1 DTD

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">