2

How to make this part of HTML valid HTML5?

<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_google_plusone" g:plusone:annotation="none"></a>
.
.
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/300
/addthis_widget.js#pubid=ra-xxxxx"></script>

The result of the W3C-validator is this:

Warning Line xx, Column xx: Attribute g:plusone:annotation is not serializable as XML 1.0.

Error Line xx, Column xx: Attribute g:plusone:annotation not allowed on element a at this point.

<a class="addthis_button_google_plusone" g:plusone:annotation="none"></a>

Thanks,

pcs
  • 1,864
  • 4
  • 25
  • 49
Advanced SEO
  • 387
  • 1
  • 4
  • 18
  • 1
    You follow [the documentation](https://developers.google.com/+/web/share/), which uses standard HTML 5 `data-*` attributes instead of expando-attributes. – Quentin May 07 '15 at 09:13
  • refer this link http://stackoverflow.com/questions/9139019/google-1-code-validation-error-missing-attribute – pcs May 07 '15 at 09:13
  • @saina: please read [Should 'Hi', 'thanks', taglines and solutions be removed from posts?](https://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts) as I noticed you have a habit of *adding* it to posts. – Jongware May 14 '15 at 09:16
  • okay.. i have an one doubt @Jongware: when edit the post.. it should at least 6 characters.. so what to do? thanks. – pcs May 14 '15 at 09:18
  • @saina: then don't attempt to edit. See [What is the reason behind the 6 character minimum for suggested edits?](http://meta.stackoverflow.com/a/251618/2564301) and [Focus on what you can do, not on what you can't do](http://meta.stackoverflow.com/a/277195/2564301). – Jongware May 14 '15 at 09:26

3 Answers3

4

Try like this,

 <div class="g-plusone" data-size="tall" data-count="true">
    ....
    </div>
pcs
  • 1,864
  • 4
  • 25
  • 49
3

If you are working with HTML5 you can use this alternative from the Google-documentation:

<div class="g-plusone" data-size="standard" data-count="true"></div>
Stephan Weinhold
  • 1,623
  • 1
  • 28
  • 37
0

That's actually part of the AddThis API. You will have to contact them and ask them to W3C compatible.

abraham
  • 46,583
  • 10
  • 100
  • 152