HTML: What is `xmlns:fb=“http://www.facebook.com/2008/fbml”`?

做~自己de王妃 提交于 2019-12-03 06:32:38

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4651602/html-what-is-xmlnsfb-http-www-facebook-com-2008-fbml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!