Sintassi HTML 4.01
Il browser viene informato su quale sintassi segue il codice della pagina
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
...
...
Sintassi HTML5
Con HTML5 si semplifica tutto, viene introdotta un’unica possibilità!
<!DOCTYPE html>
Pagina di esempio
<!DOCTYPE html>
<html>
<head>
<title>HTML5: pagina di esempio</title>
</head>
<body>
<h1>Titolo</h1>
<p>Paragrafo</p>
<!-- commento -->
</body>
</html>