Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

Stray doctype.

All HTML documents must start with a <!DOCTYPE> (Document Type Declaration), that informs browsers about the type and version of HTML used to build the document. In HTML5, this is simply <!DOCTYPE html> and must appear at the start of the document.

Here is an example of a minimal HTML document, including the Document Type Declaration at its start:

<!DOCTYPE html>
<html>
  <head>
    <title>Test</title>
  </head>
  <body>
    <p></p>
  </body>
</html>

Related W3C validator issues