How can I resolve HTML validation errors when using Facebook Comments?

6,070

You need to use an appropriate doctype.

This has been covered (for HTML docs) on StackOverflow: https://stackoverflow.com/questions/2761622/new-facebook-like-button-html-validation

Share:
6,070

Related videos on Youtube

Joel
Author by

Joel

Updated on September 17, 2022

Comments

  • Joel
    Joel almost 2 years

    I am trying to validate my document that has the following facebook comments tag

    <fb:comments width="425"></fb:comments>
    

    I am getting validation error:

    Line 333, Column 45: Element name fb:comments cannot be represented as XML 1.0.

    Element fb:comments not allowed as child of element div in this context. (Suppressing further errors from this subtree.)
    

    Any idea how to fix it?

    Joel

  • Casey Chow
    Casey Chow over 13 years
    Even with the appropriate doctype facebook comments will not validate as valid XHTML HTML or any type of HTML. They are just not standard tags. In your case, dont worry about it, because they are automatically parsed and fixed by facebook plugins on the page.