Finally completed the xhtml validation codes for the first six pages.
If pages were written in a rush, it is easy to forget to close all the tags.
One code, however, remains in error.
That was a code given by Google’s Adsense for search:
The Markup Validation Service Report
Validation Output: 1 Error
1. Error Line 20, Column 23: document type does not allow element “style” here
<style type="text/css">
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).
Good to hack it?
One way is get around it is perhaps to move this line of code inside the head element.
<style type="text/css">
@import url(http://www.google.com/cse/api/branding.css);
</style>
But then, that would be breaking the Google’s TOS.
Better not touch it since everything is working in order.
Tags: markup • validation
Category: Build-Website
Tuesday, January 12th, 2010 at 6:29 pm