W3C validation issue ('document type does not allow element "a" here') for Google+ link in head

62 views Asked by At

I'm reasonably new to the world of programming an need a gentle push in the right direction. Any assistance you can provide would be greatly appreciated. The website in question: www.championfreight.co.nz

The W3C report: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.championfreight.co.nz%2F

What I don't understand is, many of the issues relate to code I've simply inserted into the head element from the likes of Google+, Facebook, Google, etc. So these are good sources and yet the report says the code is wrong?

Example:

<a href="https://plus.google.com/100518166975056212980" rel="publisher"></a>

The report says:

Line 39, Column 73: document type does not allow element "a" here; assuming missing "object" start-tag'

How can I fix this? This is the code straight from Google+ - copy/pasted into the head element.

1

There are 1 answers

0
unor On

The a element is not allowed in the head element.

You might want to use the link element instead:

<!-- Google+ -->
<link href="https://plus.google.com/100518166975056212980" rel="publisher" />