HTML <!DOCTYPE> element


<!DOCTYPE> element specifies HTML version and language of current document by referring to a Document Type Definition (DTD). Browsers display web page content based on the DTD. <!DOCTYPE> must be put at the very beginning of the HTML document.

The <!DOCTYPE> declaration of this page:

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


In HTML5, <!DOCTYPE> is simplified, it do not need a DTD reference, and the HTML5 capable browser can parse the content correctly.

A typical HTML document:
<!DOCTYPE HTML>
<html>
<head>
...
</head>
<body>
...
</body>
</html>