codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<script type="text/javascript">
document.write("<h1>Ciao questa pagina non è valida!!!!</h1>");
</script>
</body>
</html>
Vorrei capire perchè il validatore del w3c non mi considera valida una pagina così
C'è qualcosa di illegale in quel doc.write?
L'errore restituito è
Below are the results of attempting to parse this document with an SGML parser.
Line 14, column 19: document type does not allow element "h1" here (explain...).