Re: [VE][76] Google +1 Markup tagged as 'undefined'

5.6.2011 7:40, Peter Petrov wrote:

> Validating http://www.netreviewssite.com/review/www.plentyoffish.com
> Error [76]: "element X undefined"
>
> 1./Line 97, Column 139/: *element "g:plusone" undefined*

That’s because it _is_ undefined, according to the Document Type 
Definition that your document declares.

> In addition, the markup for the facebook ‘like’ button is also marked as
> errors, althou perfectly functional and far from noncompliant I would say.

Validation isn’t about functionality or compliance except perhaps 
indirectly. Validation is about checking conformance to the formal 
syntax definition that the document itself declares. (‘HTML5 validation’ 
is something else.)

Now, the pragmatic side. Google decided to use tag soup for +1 buttons, 
so we just have to live with it. As you normally use at most one +1 
button per page, it is easier to ignore the validator’s error message 
than to do something about it. But for other options, check
http://stackoverflow.com/questions/6217434/google-1-button-not-w3c-compliant

The Facebook tag soup is a bigger nuisance, but even here, it is 
questionable whether you should take trouble of hiding error messages 
with trickery (generating the invalid markup with JavaScript so that 
validators won’t see it); see
http://stackoverflow.com/questions/2761622/new-facebook-like-button-html-validation

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/

Received on Monday, 6 June 2011 06:04:09 UTC