大网数据广告活动
网站运营与故障问答

Schema in HTML: in meta, or with JSON-lD, and in content

· 52CE 我爱测

This is for a Magazine website. Each page belongs to the magazine so we have the overall html level schema as type Organization . However, we are now beginning to question if this is sensible. Magazine articles or sections of art…

问题原文

原帖链接 · Khom Nazid · CC BY-SA 4.0

This is for a Magazine website. Each page belongs to the magazine so we have the overall html level schema as type Organization. However, we are now beginning to question if this is sensible.

Magazine articles or sections of articles are not Organization.

Questions:

  1. Each article page, we can make the overall HTML scope Article. The producer itemprop may be the magazine name. However, in this case if we had the meta tags and the JSON-LD, then do we still need itemprops inside the body content? Or is that considered duplicate?
  2. Each article category page, we can make the overall HTML scope CreativeWork, and then inside the body each listing of article (in UL/LI) can be the Article. This does make sense because clicking on that article's link will anyway bring up the article page, which would have the same structure as described in #1 above. Is this correct? If so, what would the JSON-LD of this category page contain, will it be a large JSON or all the articles, or should we leave that be?
  3. Home page: is that a CreativeWork too then?

Broadly, the confusion is which of these we should have. All or some: meta tags, and/or JSON-LD, and/or correct attributes inside the body of the HTML?

Appreciate any pointers!

已采纳解答

原帖链接 · unor · CC BY-SA 4.0

If you can control it, don’t use multiple syntaxes. Choose one syntax (JSON-LD or Microdata or RDFa; see a comparison) and stick with it.

If you use a syntax that makes use of HTML attributes (i.e., Microdata or RDFa), I would recommend not to care about the HTML structure at first. For the structured data, it doesn’t matter whether something is specified on, say, the html element, the body element, or a div element. First think about the data you want to convey, and only then think about how to express it with the syntax.


From what you describe, you have a WebSite with

  • a WebPage for the homepage,
  • an ItemPage for each article page, and
  • a CollectionPage for each category page.

The primary item of each page can be specified with the mainEntity property:

  • Article for the ItemPage, and
  • ItemList of Articles for the CollectionPage.

The Organization can be referenced from each page and from each article, e.g., via author, publisher etc.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-07-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。