You are here: Home > Google Chrome Tutorial

Solution: Element name g:plusone cannot be represented as XML 1.0

September 08, 2011 08:22 PDT
Google Plus button

Google provides a script for plusone button. Unfortunately, it's not validated by W3C Validator, you will get 2 errors:

Element name g:plusone cannot be represented as XML 1.0.

Element g:plusone not allowed as child of element td in this context. (Suppressing further errors from this subtree.)

Final Solution: Check HTML5 valid syntax option on advance settings

Update on Jan 08, 2012: Google has added a new option named "HTML5 valid syntax" to fix this problem:

  1. Visit plusone button
  2. Click Advanced options, then check the option HTML5 valid syntax
  3. Copy the codes into your site.

To use Google +1 button without w3c errors, There are two ways to fix this problem:

Solution 2: Use JavasScript

Just use document.write to output the plusone code, for example:

<script type="text/javascript">

  document.write('<g:plusone size="medium" href="https://googleplussearch.chromefans.org" count="true"></g:plusone>');

</script>

Solution 3: copy the html code created by google script and modify to conform to w3c standards

This way was published by 911web.org, click here to get details.



#1  posted on January 06, 2012 16:03 PST
Solution 1 for me
Thanks :o)

#2  posted on April 22, 2013 11:41 PDT
i got it and fix Element g:plusone not allowed as child of element div in this context. (Suppressing further errors from this subtree.) this problem for my web blog www.fileshosts.blogspot.com thanks

#3  posted on September 24, 2013 03:51 PDT
solution to is my problem the error is <g:plusone></g:plusone>

#4  posted on November 18, 2013 21:50 PST
HTML5 Validation Error : Element name su:badge cannot be represented as XML 1.0.

<su:badge layout="3"></su:badge>

#5  posted on December 24, 2013 10:25 PST
thank you. its work in my site :)

#6  posted on February 16, 2014 00:13 PST
I really like this blog, because this blog is very useful for myself and a lot of people.

#7  posted on October 21, 2014 20:30 PDT
Thanks for this post, this fix my site
Quote:
http://wapvinagame.com

Leave your comment
If you want to leave your comment on this article, simply fill out the next form:
Name: * Requirement
E-mail: Optional (won't be published)
Website / Blog: Optional
Are you a human? For anti spammer, please calculate following expression:
3 x 4 + 1 = * Requirement
Comment:
* Requirement
You can use these tags:
[b] Text [/b]: Bold text
[quote] Text [/quote]: Quote text