Schema.org: What to use, Microdata or JSON-LD?

后端 未结 1 1277
天涯浪人
天涯浪人 2021-01-22 15:50

The data markup Schema.org for search sites like Google, Yahoo!, Bing and Yandex is great for snippets. However, I perceive that most of webmasters use Microdata and almost neve

1条回答
  •  清歌不尽
    2021-01-22 16:11

    There can’t be a general answer:

    • Each consumer (search engine, tool, etc.) has its own conditions (what it supports for which feature).

    • Each syntax (JSON-LD, Microdata, RDFa, etc.) has its own advantages and disadvantages.

    Specific example to illustrate the problem: Google recommends to use JSON-LD for some of their features, but doesn’t support it for some others (e.g., for their Products Rich Snippet).

    For what it’s worth, JSON-LD and RDFa are both W3C Recommendations (while Microdata is part of WHATWG’s Living HTML standard, but no longer under development at W3C). So if you care about this, you might want to consider using RDFa instead of Microdata (see my comparison). RDFa and JSON-LD are, of course, quite different: with JSON-LD you’d have to duplicate your content, while you can reuse it with RDFa.

    0 讨论(0)
提交回复
热议问题