Question

I'm gleaning from this question [Facebook Connect Won't Validate that using Facebook Connect and other facebook 'social widgets' just doesn't result in a 'valid' document.

Concerning (X)HTML5, however, what would be the (most) appropriate doctype/header if I want to include Facebook Connect content on my pages, and be as close to 'valid' (X)HTML5 as possible?

Was it helpful?

Solution

If you're using XHTML5, then you don't need to include a DOCTYPE. You can include <!DOCTYPE html> if you like, but it's not necessary. You simply need to specify the XHTML namespace, and the namespace for Facebook Connect.

I'm not familiar with Facebook Connect at all, but you will need to make sure the document is processed as XML, which means serving it with an XML MIME type like application/xhtml+xml. (The text/html serialisation does not support namespaces).

The HTML5 validator will not be able to check the conformance of the facebook markup, but it should still be able to check the conformance of the XHTML. Elements from other namespaces are allowed to be included, even though the HTML5 validator does not support them.

OTHER TIPS

There is no proper way.

I found these links helpful. Maybe you can find them useful either.

http://earthpeople.se/labs/2010/09/html5-validation-with-facebook-opengraph/

http://fbml5.blogspot.com/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top