The following code snippet results in the quoted validation error:
SNIPPET:
<!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>
<style type="text/css">
h1 {
font-size: 2.5em ;
font-style: italic ;
color: #993300 ;
padding-left: 400px ;
padding-top: 150px ;
}
</style>
<title>About Us</title>
</head>
<body>
<div>
<p>
<h1>Who We Are</h1>
</p>
</div>
</body>
</html>
VALIDATION ERROR:
"document type does not allow element "h1" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
<h1>Who We Are</h1>✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>")."
Why should the code snippet result in a validation error?