需要解释xmlns,我的代码片段是做什么

时间:2018-04-10 16:11:34

标签: html5 xhtml

如果我的问题不充分,请原谅我。我是这个网站的新手,我正在努力。

我是使用html的新手,并且我被指示为我的作业制作网页。我在网上注意到网页的html在检查之后有以下代码:

> <html xmlns:og="http://opengraphprotocol.org/schema/"
> xmlns:fb="http://www.facebook.com/2008/fbml"
> xmlns:website="http://ogp.me/ns/website" lang="en-US" itemscope=""
> itemtype="http://schema.org/WebPage" class="yui3-js-enabled js flexbox
> canvas canvastext webgl no-touch hashchange history draganddrop rgba
> hsla multiplebgs backgroundsize borderimage borderradius boxshadow
> textshadow opacity cssanimations csscolumns cssgradients
> cssreflections csstransforms no-csstransforms3d csstransitions video
> audio svg inlinesvg svgclippaths wf-proximanova-n1-active
> wf-proximanova-i1-active wf-proximanova-n3-active
> wf-proximanova-i3-active wf-proximanova-n4-active
> wf-proximanova-i4-active wf-proximanova-n5-active
> wf-proximanova-i5-active wf-proximanova-n6-active
> wf-proximanova-i6-active wf-proximanova-n7-active
> wf-proximanova-i7-active wf-proximanova-n8-active
> wf-proximanova-i8-active wf-proximanova-n9-active
> wf-proximanova-i9-active wf-active" style=""><div id="yui3-css-stamp"
> style="position: absolute !important; visibility: hidden
> !important"></div><head>

我的问题是:

  • 什么是xmlns,冒号后面的文字是什么意思?

换句话说,xmlns:og="http://opengraphprotocol.org/schema/"的意思是什么,xmlns:fb="http://www.facebook.com/2008/fbml"是什么意思,等等。

我想知道是否有人可以给我一个简要的解释,说明我在这里粘贴的html代码中的每个部分。谢谢大家的时间。正如我所说,我希望这个问题不会冒犯任何人,我只是想学习。所有输入都表示赞赏。

1 个答案:

答案 0 :(得分:-1)

xmlns:og="http://opengraphprotocol.org/schema/"是名称空间赋值的XML前缀样式中的属性。

HTML使用者可以使用它来决定是否将以og:开头的元素和属性解释为对其有意义。但是你拥有的HTML不是XML,所以该属性很可能什么都不做,除了提示HTML的人类读者使用og:暗示开放图协议的数据。

同样,xmlns:fb