HTML:什么是`xmlns:fb="http://www.facebook.com/2008/fbml"`?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4651602/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
HTML: What is `xmlns:fb="http://www.facebook.com/2008/fbml"`?
提问by Rudiger
What is xmlns:fb="http://www.facebook.com/2008/fbml"
?
什么是xmlns:fb="http://www.facebook.com/2008/fbml"
?
I've been seeing it in a lot of <html>
tags recently. What does it do?
我最近在很多<html>
标签中看到了它。它有什么作用?
回答by Matthew Scharley
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 Technically speaking, the value of the <fb:*>
tags.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.
虽然我还没有看到它在使用中,但这是标准的 XML 符号,用于扩展当前的 XML 命名空间(在本例中为 XHTML)与另一个(在本例中为 FBML)。 这会告诉您的浏览器在哪里可以找到 FBML 的规范,而后者又会告诉它如何处理从技术上讲,<fb:*>
标签。xmlns:*
属性的值只是一个唯一的标识符,但通常它是一个 URL,指向一种或另一种形式的定义。在这种特殊情况下,不幸的是,URL 没有指向定义。
回答by Chris Haas
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.
正如@Matthew Scharley 所说,它用于在您的网站上嵌入 Facebook 特定的标签。例如,这是我们公司网站上的 Facebook 流。另一个常见的用途是网站上的“喜欢”按钮。更多信息可以在Facebook 开发者网站上找到。
UPDATE
更新
Here's some additional widgets/plugins.
这是一些额外的小部件/插件。