Schema.org: Use Microdata, RDFa or JSON-LD?

六月ゝ 毕业季﹏ 提交于 2019-11-29 11:13:52
unor

There is no general answer, it depends on the consumer of the data.

A specific consumer supports a specific set of syntaxes, and might or might not recommend a subset of these supported syntaxes.

Because search engines usually try to make sure not to get lead astray (e.g., a page about X claims via its Schema.org use to be about Y), it seems natural that they would prefer a syntax that couples the Schema.org metadata to the visible content of the page (in HTML5, this would be Microdata or RDFa); for the same reasons why many meta tags are dead for SEO.

However, this is not necessarily always the case. Google, for example, recommends the use of JSON-LD for a few of their features (bold emphasis mine):

  • Promote Critic Reviews:

    Though we strongly recommend using JSON-LD, Google can also read schema.org fields embedded in a web page with the microdata or RDFa standards.

  • Sitelinks Search Box:

    We recommend JSON-LD. Alternatively, you can use microdata.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!