RDFa为property
attribute元素引入了property
,W3C甚至为<meta>
。例如,Facebook的recommends this as an extension to HTML5协议使用RDFa Open Graph属性(例如,来自Open Graph网站的示例):
property
但是HTML5规范似乎禁止这种用法。我不是在谈论它是否允许<html prefix="og: http://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
…
属性。我指的是它明确禁止property
属性,而没有content
的name
属性:
如果指定了the
<meta>
element或<meta>
,则还必须指定name
属性。否则,必须将其省略。
这是否与当前的RDFa使用(例如在Open Graph中直接冲突? HTML5规范似乎也需要http-equiv
属性。
W3C建议“ HTML + RDFa 1.1”content
HTML规范(您可以在W3C注释中找到name
。
此扩展名更改了extends元素的HTML一致性要求:
如果all extensions元素上存在RDFa
meta
属性,则既不需要@property
,meta
或@name
属性,也必须指定@http-equiv
属性。
因此,这两个HTML + RDFa元素有效:
@charset
(其他两个@content
元素无效,因为它们具有URL值,为此<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
。]