How to bypass w3c validation in case of facebook like code

i am amazed how this guys <snip/> have bypass the w3c validation without touching the facebook like gadget… they are just excellent.

Please Tell me if anyone have got idea?

thanks

What do you mean by ‘bypass the w3c validation’?

Well if when i use facebook like button on my website its create error when i try to validate w3c and if i change the code which facebook provide its not work anymore…

It doesn’t really matter if the FB code doesn’t validate. Validation is only a guide, to warn you if there are potential problems.

Anyhow, that site you linked to probably validates because it is using an outdated doctype, which allows for old-style coding:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

You are probably using a more modern doctype. Changing to an old doctype might get rid of your validation errors, but that’s a bit like sticking your head in the sand to make your problems go away. :slight_smile:

FB code just doesn’t validate, so if you are going to use it, you have to accept that. There are no prizes for clean validation, anyhow. It’s just a way of checking if there are any major issues that may cause your page to break. The FB button won’t do that, though, so it’s not a problem.

Thanks for your reply sir, My question is " If i leave it as it is… will it affect SEO for my webpage?? "

No, it shouldn’t affect it at all. Validation is not really an SEO issue.

Thank you…

<div id=“fb-root”></div>
<script type=“text/javascript” language=“javascript”>
//<![CDATA[
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/en_US/all.js#xfbml=1”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));
//]]>
</script>
<script type=“text/javascript” language=“javascript”>
// <![CDATA[
document.write(‘<fb:like href=“url” send=“false” width=“450” show_faces=“false”></fb:like>’);
// ]]>
</script>
</div>