I'm trying to validate my document for HTML5 using the W3C validator at http://validator.w3.org/check. When I run the code below using "direct input" I get error messages like Element head is missing a required instance of child element title and Stray start tag html. This baffles me, because the <html>
tag is right there. Why can't the validator see it?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="description" content="some content">
<title>page title</title>
</head>
<body>
</body>
</html>
Update: I'm using PHP to generate parts of the file and it turns out this was the cause of the error.