HTML5 valid Google+ button - Bad value publisher for rel attribute

I recently migrated my site with xhtml transition to html5. In particular, so that I can use valid block level anchor labels. <a><div /></a> .

While checking, I found the following error:

The publisher of the bad values ​​for the element's rel on link attribute: The keyword publisher is not registered.

But according to this page, this is exactly what I have to do.

https://developers.google.com/+/plugins/badge/#connect

My code is:

 <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 cannot figure out how to implement this using the html5-compatible way. Can anyone help?

+6
source share
3 answers

1st ) Within <head> :

 <!DOCTYPE html> <head> <!--head code--> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> </head> 

2nd ) Somewhere inside the <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 "FRIENDS" from http://validator.w3.org/

You can change https://plus.google.com/u/1/+StackExchange/ for any google + URL you want ( https://plus.google.com/xxxxxxxxxxxxxxxx/ )

Documentation

+3
source

Google sends help: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=2539557&topic=2371375&ctx=topic .

You need to add ?rel=author to your <a> href value and remove this inappropriate <link> :

 <a href="https://plus.google.com/12345?rel=author"> <img src="https://ssl.gstatic.com/images/icons/gplus-16.png"/> </a> 
0
source

Well, you should add two links inside the main tag and the body tag as follows:

 <head> <link href='https://plus.google.com/xxxxxxxxxxxxxxxxx' itemprop='publisher'/> </head> 

After that, use the google + format in the body. It should be below the body tag:

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

here is a screenshot. Unfortunately! Sorry, I need 10 reputations for uploading images on this page ... LOL Of the two formats, we will be checked using the structured data of Google webmaster and validator.w3.org. As you know, the microdata schema uses the publisher as one of the itemprop elements, so it should look something like this in the body or html tags:

 <body itemscope="" itemtype="http://schema.org/Blog"> 

*) what is it when your type of site is BLOG.

(love this forum) tina-andrew-blog NB: I found this: https://productforums.google.com/d/msg/webmasters/lciIK8HdJXE/kcv8EipRzzcJ But, I am doing the code above, it works well: (

0
source

Source: https://habr.com/ru/post/913148/


All Articles