html - 带有 schema.org/Article 标记的文章的多个部分

标签 html schema.org

假设在 HTML 网页中有一篇文章。目的是使用这样的模式标记内容(我更喜欢 schema.org 提供的模式)。因此,人们开始按照 schema.org/Article 标记内容。 .关键是,如果文章属于多个部分,是否应该将每个部分放在一个单独的范围内,如下所示:

<span itemprop="articleSection">Section1</span> -
<span itemprop="articleSection">Section2</span> -
<span itemprop="articleSection">Section3</span>

或者相当于让它们像下面这样在一个独特的范围内?

<span itemprop="articleSection">Section1 - Section2 - Section3</span>

最佳答案

如果您的文章是许多不同部分的一部分,那么您应该像第一个示例一样将每个部分标记为文章部分:

<div itemscope itemtype="http://schema.org/Article">
  <span itemprop="name">President to throw ceremonial first pitch at Nationals Park</span>
  by <span itemprop="author">John Smith</span>
  <span itemprop="articleSection">Sports</span> -
  <span itemprop="articleSection">Politics</span> -
  <span itemprop="articleSection">US News</span>
</div>

关于html - 带有 schema.org/Article 标记的文章的多个部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11126000/

相关文章:

javascript - 将现有站点的特定部分嵌入另一个站点

php - 最佳实践 : Use same form for creation and update

html - 点击label导致img上移

html - 如何在 Schema.org 标记中将工作 (jobTitle) 与组织 (worksFor) 相关联?

html - 换行时每行保持相同数量的 flex child

javascript - 在Electronjs中获取值选择(JavaScript)和网格

seo - 带有评级星的Google搜索(schema.org)

blogs - 使用 Schema.org 标记博客的首选方法

google-search - Google 搜索 : is it necessary to make “carousel” the root element? 中 "ItemList"片段的结构化数据

seo - schema.org 中的名称属性是什么?