Schema.org:使用什么,微数据或JSON-LD? [英] Schema.org: What to use, Microdata or JSON-LD?

查看:159
本文介绍了Schema.org:使用什么,微数据或JSON-LD?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用于Google,Yahoo!,Bing和Yandex等搜索网站的数据标记 Schema.org .但是,我认为大多数网站管理员都使用微数据,几乎从未使用 JSON-LD .我最近了解了JSON-LD,对此有一些疑问:

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 never use JSON-LD. I learned about JSON-LD recently and I have some doubts:

我可以使用搜索引擎而不会出现兼容性问题吗?

Could I use it without compability problems with search engine?

推荐答案

不可能有一个普遍的答案:

There can’t be a general answer:

  • 每个使用者(搜索引擎,工具等)都有自己的条件(它支持哪种功能).

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

每种语法(JSON-LD,Microdata,RDFa等)都有其优点和缺点.

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

用于说明问题的具体示例:Google 建议使用JSON- LD表示其某些功能,但不支持其他某些功能(例如,其产品丰富摘录).

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).

对于它的价值, JSON-LD RDFa 都是W3C建议(而Microdata是 WHATWG的Living HTML标准的一部分,但我的比较).当然,RDFa和JSON-LD有很大的不同:使用JSON-LD,您必须复制您的内容,而您可以将其与RDFa重复使用.

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.

这篇关于Schema.org:使用什么,微数据或JSON-LD?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆