The HTML !DOCTYPE is used for specifying which version of HTML the document is using. The following specifies HTML5 and is the only modern declaration that should be used going forward.

				
					<!DOCTYPE html>
				
			

All HTML documents must start with a !DOCTYPE declaration.

				
					<!DOCTYPE html>
<html>
<head>
    <title>Page Title</title>
</head>
<body>
    <h1>This is a Heading</h1>
    <p>This is a paragraph.</p>
</body>
</html>
				
			

Older DOCTYPE Formats

There are older DOCTYPE declarations that are no longer used in modern website development.

HTML 4.01:

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

XHTML 1.1:

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