Forum Moderators: open

Message Too Old, No Replies

W3C validation

problems

         

puremetal

4:16 pm on Sep 10, 2007 (gmt 0)

10+ Year Member



I've been trying to iron out little bugs on a site to get it W3C validated (HTML 4.01 transitional), but I keep failing. This is the first time I have done this and I was wondering if anyone could help work out why this is :)

The errors are below. Is it really saying i can't have an end to my head tag or a beginning body tag. the head tag IS open as well... what do i do? it can't seriously not want me to have a <body> tag can it?


Validation Output: 2 Errors
Line 186, 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 occurred in a script section of your document, you should probably read this FAQ entry.

Line 189, Column 5: document type does not allow element "BODY" here.
<body>

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).

[validator.w3.org...]

i found this which just confused me further: [validator.w3.org...]

pageoneresults

4:27 pm on Sep 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello puremetal, Welcome to WebmasterWorld!

That error usually occurs when you have an XHTML trailing slash. You probably have a link rel element with this at the end />. If you do, that is what's breaking the <head></head> element using a 4.01 Transitional DOCTYPE.

puremetal

4:39 pm on Sep 10, 2007 (gmt 0)

10+ Year Member



yay! you weren't just right, you were very right!

thank you :)

i was checking my metatags for just that, but didn't think to check that link rel tag. thanks again! :)