Can you have multiple itemprop=description on a page?

时光毁灭记忆、已成空白 提交于 2019-11-26 23:26:09

问题


I can't seem to find the answer for this anywhere.

I've got itemscope itemtype="http://data-vocabulary.org/Review" on the body tag.

Now the content on the page is spread across multiple divs with images and such between. If I were to wrap it all, then other content would actually come first before the main body, so I need to be able to put the itemprop="description" on multiple divs.

It seems to show up OK in the google snippets tool but I want to know if it would be fine or whether it'd only take 1 into account?


回答1:


Well, you are adding several descriptions for the same item. That’s fine from the Microdata perspective.

Microdata only defines that an item’s properties with the same name are ordered (see the examples), while different properties are "unordered with respect to each other".

Microdata does not define if this should mean that all these descriptions should be consolidated into one description (your use case), or if these are alternative descriptions (for example one could offer descriptions in several languages).

But how consumers (like Google) interpret this, that is up to them; it might be unknown/undocumented; it might change daily. Discussion about this is probably off-topic on SO; it might better fit on Webmasters SE.




回答2:


you want itemprop="description" on multiple div elements here you can see itemprop="name" on multiple span elements for example, so it might be ok



来源:https://stackoverflow.com/questions/21223906/can-you-have-multiple-itemprop-description-on-a-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!