I recently migrated my website from xhtml transitional to html5. Specifically so that I could make use of valid block level anchor tags. <a><div /></a>
.
When running validation I encountered the following error:
Bad value publisher for attribute rel on element link: Keyword publisher is not registered.
But according to this page, that is exactly what I am supposed to do.
https://developers.google.com/+/plugins/badge/#connect
My code:
<link href="https://plus.google.com/xxxxxxxxxxxxxxxx" rel="publisher" />
<a href="https://plus.google.com/xxxxxxxxxxxxxxx?prsrc=3" style="text-decoration:none;">
<img src="https://ssl.gstatic.com/images/icons/gplus-16.png" alt="" style="border:0;width:16px;height:16px;"/>
</a>
I can't figure out how to implement this in an html5 compliant way. Can anyone help?
1st) Within <head>
:
<!DOCTYPE html>
<head>
<!--head code-->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
</head>
2nd) Anywhere within <body>
:
<body>
<!--body code-->
<div class="g-plusone" data-size="small" data-annotation="none" data-href="https://plus.google.com/u/1/+StackExchange/"></div>
</body>
This code is valid AND "FRIEND'S" with http://validator.w3.org/
You can change https://plus.google.com/u/1/+StackExchange/
for any google+ url you desire (https://plus.google.com/xxxxxxxxxxxxxxxx/
)
Documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With