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?


1 Answer 1


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

  • 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.
    – Frank
    Commented Nov 17, 2010 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.