Search code examples
facebookhtmlfbmlfbconnect

What are the consequences for ignoring xmlns:fb in <html> tag


So, it's been known that xmlns:fb is required for facebook's tags to validate in XHTML strict or whatever validators. I don't believe I should care about it. (May be the importance of validators shall become another topic of discussion)

However, my question is what are going to be consequences of not having the xmlns:fb attribute for my body tag, given the case that I'm gonna be using HTML5 boilerplate and I don't care if it validates or not.

Has anyone ever face any problem by not having that attribute, such as breaking the page in some old browsers or etc.


Solution

  • As long as you don't want your page to be machine-readable (i.e. as XML, which XHTML strict or not is one kind of), you don't need to use it.

    Or in other words, if you never (but never say never!) want to do something like XmlReader.Load(yourpage.html), you don't need it.

    Generally, I believe that in the majority of cases, web pages are not meant to be machine readable, and only need to display correctly. There's always the case that if you don't obey to a standard that your page shows hard-to-diagnose bugs, but since you're only asking about a namespace declaration, in the sense of "just HTML": no browser will load your page differently without it.

    Of course, there are many schools of thought that will argue that you should include those namespaces, and generally, I'm part of such school ;).