Html 元标签 itemprop
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14246710/
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
Meta tags itemprop
提问by pessi
I am trying to include extracted structured data in my webpages.
我正在尝试在我的网页中包含提取的结构化数据。
I included this for description:
我包括这个描述:
<meta itemprop="description" content="my description" />
However I realised that there is already a normal meta description on the page:
但是我意识到页面上已经有一个正常的元描述:
<meta name="description" content="my description" />
Is it ok to leave both of them or it is really necessary to merge them together maybe like:
可以同时离开它们还是真的有必要将它们合并在一起,例如:
<meta itemprop="description" name="description" content="" />
回答by Alohci
You shouldleave both of them. The Microdata Specsays:
你应该离开他们两个。该微数据规格说:
If a meta element has an itemprop attribute, the name, http-equiv, and charset attributes must be omitted, and the content attribute must be present.
如果 meta 元素具有 itemprop 属性,则必须省略 name、http-equiv 和 charset 属性,并且必须存在 content 属性。
so it would be invalid to merge them.
所以合并它们是无效的。