我想使用activeIngredient属性http://health-lifesci.schema.org/activeIngredient列出两个有效成分。做标记的正确方法是什么?
一旦正确标记,如果它在Google结构化作者工具中显示为分配给1个属性的2个值,如下所示:
activeIngredient ingredient 1, ingredient 2 或者,activeIngredient属性是否需要出现两次,如下所示:
activeIngredient ingredient 1
activeIngredient ingredient 2下面的链接显示了一个示例,其中使用activeIngredient属性来描述单个成分。它出现在页面的底部三分之一处。https://search.google.com/structured-data/testing-tool/u/0/#url=http%3A%2F%2Fwww.aleve.com%2F
发布于 2017-12-15 02:57:49
除非它的描述不是这样(示例:keywords),否则Schema.org属性总是使用单个值。
如果要提供多个值,则必须重复属性(对于Microdata和RDFa),或者提供数组值(如果是JSON)。
因此,activeIngredient是一种有效成分。可以这样指定多种活性成分:
<ul>
<li itemprop="activeIngredient">ingredient 1</li>
<li itemprop="activeIngredient">ingredient 2</li>
</ul><ul>
<li property="activeIngredient">ingredient 1</li>
<li property="activeIngredient">ingredient 2</li>
</ul>"activeIngredient":
[
"ingredient 1",
"ingredient 2"
]https://webmasters.stackexchange.com/questions/111400
复制相似问题