2014-05-02 50 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