Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: incrediBILL
On my continous mission to keep my site SE friendly, I decided to run a check of my index page through the W3C Markup Validation Service and low and behold I have 2 errors! So I have attempted to isolate the problems, however I can't seem to locate what the problem is. The 2 errors I'm getting are
"DOCTYPE" declaration not allowed in instance.
document type does not allow element "HTML" here.
Now as for anyone who has used this service it also tells you which line the problem was located at. I checked out my page in dreamweaver, which identifies lines and nothing even closely matches to what their error lines say. At the very top of my page, I call my doctype like this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
and as far as this <html> tag is concerned, I can't find it. It actually points to the begining of a php script, <?php. I just dont get it. If anyone would like for me to post the code I can.
Here are lines 49-52:
49. <td colspan="2" valign="top" bgcolor="#CFE1AF">
50. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
The file(s) you're including via your switch statement contain doctype, html and head tags, and is dropping them into the middle of your page where they don't belong.
And they're putting this at lines 78 and 79:
so they're also adding close-body and close-html tags in the middle of your page.
You need to edit the included pages so that they only contain the actual bit of html code and content to appear at that spot in your page. They should not be complete html documents with a doctype, head tags, body tags, etc.
Now also, I would prefer for these pages not to be crawled.
Is it the inserted section of the page that you don't want indexed, or the entire resulting page? If the former, rather than doing an include, you could insert the content as a separate page within a borderless
- the separate page including a noindex meta tag or excluded by robots.txt.
I appreciate all the help here, its been a real treat to learn from everyone here :)