Forum Moderators: open
I'm getting some odd errors from the w3c html validator I don't understand. Specifically, it's telling me that my <head> tag isn't open when it is, I'm not allowed such and such element here.. etc.
I'm assuming that because it can't find the beginning of the <head> tag, it's giving me all the other messages. HTML and errors follow:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />
<script type="text/javascript" src="includes/scripts/common.js"></script>
<style type="text/css" media="all">@import "includes/css/default.css";</style>
</head>
<body>
//the page
</body></html>
The associated errors are:
document type does not allow element "META" here
document type does not allow element "STYLE" here
end tag for element "HEAD" which is not open
document type does not allow element "BODY" here
I'm guessing this is because it doesn't know the <head> tag is open .. am I right?
Can anyone help?
Thanks in advance!
Alex ...
Try this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="imagetoolbar" content="no">
<script type="text/javascript" src="includes/scripts/common.js"></script>
<style type="text/css" media="all">@import "includes/css/default.css";</style>
</head>
<body>
</body>
</html>
Until recently, the validator didn't catch this error at all and would have said that the page was valid. Now, it recognizes the fact that there is an error, but it's explanation is particularly obtuse as it can't pinpoint the exact problem.