HTML: What is `xmlns:fb="http://www.facebook.com/2008/fbml"`?
Asked Answered
E

2

34

What is xmlns:fb="http://www.facebook.com/2008/fbml"?

I've been seeing it in a lot of <html> tags recently. What does it do?

Eosin answered 10/1, 2011 at 21:17 Comment(0)
S
6

While I haven't seen it in use, this is standard XML notation for extending the current XML namespace (in this case XHTML) with another one (in this case FBML). This tells your browser where to find the specification for FBML which in turn tells it how to handle the <fb:*> tags. Technically speaking, the value of the xmlns:* attribute is simply a unique identifier, but often it is a URL which points to a definition in one form or another. In this particular case the URL doesn't point to a definition unfortunately.

See W3Schools for more information about XML namespaces.

Syne answered 10/1, 2011 at 21:23 Comment(1)
It doesn't extend the current namespace, it adds an additional namespace to the document. It doesn't tell the browser where to find anything, as far as the browser is concerned it is an arbitrary string that happens to be a URI (which is to avoid collisions with other people's namespaces). Some authors publish specifications at the namespace URI to help people writing XML documents that use the specification. Don't check out W3Schools, they were the best a decade ago which has earned them a lot of Google juice, but the quality of their content is really awful.Campanulate
L
6

Just as @Matthew Scharley said, its used to embed Facebook-specific tags on your site. For example, here's our company's Facebook stream on our site. Another common use it the "Like" button on website. More information can be found on the Facebook developer site.

UPDATE

Here's some additional widgets/plugins.

Lunarian answered 10/1, 2011 at 21:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.