2014-05-02 54 views
0

微观数据schema.org设置我的网页这样的schema.org结构:问题与谷歌加

<html itemscope="" itemtype="http://schema.org/WebPage"> 
<head> 
...some metadate about webpage... 
</head> 
<body> 

<div itemscope="" itemtype="http://schema.org/NewsArticle"> 
...some metadate about newsartilce... 
</div> 

</body> 
</html> 

首先,我想知道这是否是正确的吗?

如果是的话,我有这样一个问题:

当我把我的NewsArticle链接到谷歌加,它显示了这样的链接在谷歌加: http://edition.cnn.com/

但是,当我更改HTML标签为此:

<html itemscope="" itemtype="http://schema.org/NewsArticle"> 

它这样表示(在文章格式)在谷歌加: http://amanpour.blogs.cnn.com/2014/05/01/lagarde-ukraine-loan-not-without-risk/

我必须结构改成这样:

<html itemscope="" itemtype="http://schema.org/NewsArticle"> 
<head> 
...some metadate about newsartilce... 
</head> 
<body> 
.... 

</body> 
</html> 

回答

0

我有我的网页上有多个schema.org itemscopes。 + Snippet会使用哪一个?

如果有多个schema.org itemscopes是您的网页上定义的,+片段是从最接近你的页面的源代码顶部的itemscope创建。例如,如果您在页面中的body元素和定义在开始body标签下方的div元素上定义了itemscope,那么将从与body元素关联的itemscope创建+ Snippet。

https://developers.google.com/+/web/snippet/

如果你想要的页面被解释为通过谷歌一个NewsArticle你将不得不更改初始itemtype<html>

+0

那么你建议我改变所有页面的html的itemtype? – user3307827