inf*_*abs 2 semantic-web image-gallery microdata schema.org
我已经开始在我的 HTML 代码中使用schema.org中的模式,并准备了一个图片库(下面的片段)。当我将代码粘贴到Google Structured Data Testing Tool 时,我没有收到任何错误,因此我认为我使用这些模式的方式是正确的,但如果是这样,我仍然如此。是吗?
<figure itemscope itemtype="http://schema.org/ImageGallery">
<figcaption itemprop="description">The castle through the ages: 1423, 1858, and 1999 respectively.</figcaption>
<figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
<figcaption itemprop="caption">Etching. Anonymous, ca. 1423.</figcaption>
<a href="castle1423.jpeg" itemprop="contentURL"> <img src="castle1423_thumb.jpeg" alt="The castle has one tower, and a tall wall around it." itemprop="thumbnailUrl"> </a> </figure>
<figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
<figcaption itemprop="caption">Oil-based paint on canvas. Maria Towle, 1858.</figcaption>
<a href="castle185.jpeg" itemprop="contentURL"> <img src="castle1858_thumb.jpeg" alt="The castle now has two towers and two walls." itemprop="thumbnailUrl"> </a> </figure>
<figure itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
<figcaption itemprop="caption">Film photograph. Peter Jankle, 1999.</figcaption>
<a href="castle1999.jpeg" itemprop="contentURL"> <img src="castle1999_thumb.jpeg" alt="The castle lies in ruins, the original tower all that remains in one piece." itemprop="thumbnailUrl"> </a> </figure>
</figure>
Run Code Online (Sandbox Code Playgroud)
该image属性的ImageGallery一个)期望一个URL,和b)被定义为:
项目图像的 URL。
所以你的标记说:“我的图片库可以用三个图像来描述。 ”; 而它可能应该说:“我的 ImageGallery 由三个图像组成。 ”。
因此,image您可以指定可用于表示整个画廊的图像。
对于画廊的每个图像,您可能应该使用该associatedMedia属性(但我不能 100% 确定我是否正确地得到了它的定义,“编码”在这里让我感到困惑)。
每个标记对ImageObject我来说都很好。