Direct Input validates, Validate by URL does not

After getting the "not valid" response, and correcting some obvious  
typing mistakes and saving my UTF-8 documents without BOM, I still  
had a couple of errors. I spent some time going through all my tags  
and I could not find any problems, but it still wouldn't validate.  
Then I tried surfing to the webpage, copying the source code and  
pasting it in the Direct Input validator and it validated!

Do you have any idea why this is happening, and is there anything I  
can do about it?


The URL is the one below:
http://www.svenskakyrkan.se/hastvedapastorat/skiss/w3check/
The document is called "index.shtml".


Below is the error message I got:

This page is not Valid HTML 4.01 Transitional!

Below are the results of attempting to parse this document with an  
SGML parser.

1. Error Line 16, column 6: end tag for element "HEAD" which is not  
open .
</head>
The Validator found an end tag for the above element, but that  
element is not currently open. This is often caused by a leftover end  
tag from an element that was removed during editing, or by an  
implicitly closed element (if you have an error related to an element  
being used where it is not allowed, this is almost certainly the  
case). In the latter case this error will disappear as soon as you  
fix the original problem.
If this error occured in a script section of your document, you  
should probably read this FAQ entry.

2. Error Line 18, column 20: document type does not allow element  
"BODY" here .
<body id="startsida">
The element named above was found in a context where it is not  
allowed. This could mean that you have incorrectly nested elements --  
such as a "style" element in the "body" section instead of inside  
"head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML  
documents. Due to HTML's rules of implicitly closed elements, this  
error can create cascading effects. For instance, using XHTML's "self- 
closing" tags for "meta" and "link" in the "head" section of a HTML  
document may cause the parser to infer the end of the "head" section  
and the beginning of the "body" section (where "link" and "meta" are  
not allowed; hence the reported error).


-----------------

Jonas Lennartsson

Received on Monday, 14 November 2005 02:35:00 UTC