元名和元属性有什么区别? [英] What's the difference between meta name and meta property?
问题描述
< meta 元元素属性name =content =>
和
< meta property =content =>
元名和元属性有什么不同?
属性
属性来自 RDFa 。 RDFa 1.1扩展了HTML5,使可以在<$ c中使用 meta
和 link
元素$ c> body ,只要它们包含属性
属性。
您可以同时使用HTML5的名称
和RDFa的属性
,一起放在同一个 meta
元素上。
请注意,您可能还会看到带有 itemprop的
属性。这将来自 Microdata 。 meta
元素
Two common meta
element attributes are:
<meta name="" content="">
and
<meta property="" content="">
what is the difference between meta name and meta property?
The name
attribute is the "usual" way for specifying metadata in HTML. It’s defined in the HTML5 spec.
The property
attribute comes from RDFa.
RDFa 1.1 extends HTML5 so that it’s valid to use meta
and link
elements in the body
, as long as they contain a property
attribute.
You can use both ways, HTML5’s name
and RDFa’s property
, together on the same meta
element.
Note that you might also see meta
elements with an itemprop
attribute. That would be from Microdata.
这篇关于元名和元属性有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!