Only JSON-LD keeps schema.org data apart from visible HTML
In short
Microdata and RDFa write schema.org properties as attributes on page elements, while JSON-LD sits in a separate script element. Google calls all three equally fine when the markup is valid. Cloudflare's Markdown for Agents converter keeps JSON-LD blocks and strips other script content.
Picking a syntax does not mean picking a vocabulary. schema.org states that you use its vocabulary with the Microdata, RDFa or JSON-LD formats to add information to web content (schema.org's guide). That guide teaches Microdata, yet most examples on the schema.org site also show RDFa and JSON-LD, and the guide says its basic ideas of types and properties are relevant beyond Microdata.
Related: schema.org
Where each syntax puts the data
JSON-LD is defined by the W3C as "a JSON-based format to serialize Linked Data" (JSON-LD 1.1). Google describes it as a JavaScript notation embedded in a <script> tag in the <head> and <body> elements of a page, and its sample recipe page places the block in the head (Google's introduction):
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Recipe",
"name": "Non-Alcoholic PiƱa Colada"
}
</script>
This markup is not interleaved with the user-visible text, which Google says makes nested data items easier to express.
Related: JSON-LD
Microdata works through attributes on the elements a reader already sees. The WHATWG standard represents items and properties with regular elements: the itemscope attribute creates an item, and itemprop on one of that item's descendants adds a property (WHATWG Microdata). An itemtype value, if specified, must consist of tokens that are each a valid absolute URL, all defined to use the same vocabulary. MDN describes microdata as a way to nest metadata within existing content on web pages (MDN's microdata guide). schema.org's guide marks up a movie page with these attributes, giving the item type as a URL (schema.org's guide):
<div itemscope itemtype="https://schema.org/Movie">
<h1 itemprop="name">Avatar</h1>
<span itemprop="genre">Science fiction</span>
</div>
Google says microdata is typically used in the <body> element but can be used in the <head>.
RDFa is attribute-based too, with a different attribute set. The RDFa Primer says some HTML attributes, such as href and src, are re-used while other RDFa attributes are new, and that none of the RDFa-specific attributes have any effect on the visual display of the HTML (RDFa Primer). In RDFa Core, @about generally indicates the subject, one of @property, @rel or @rev represents a predicate, @typeof lists the RDF types for a subject, and @vocab defines the mapping used when a term appears in an attribute value (RDFa Core 1.1). Google describes RDFa as commonly used in both the <head> and <body> sections of a page.
Who maintains each specification
- JSON-LD. The JSON-LD Working Group published JSON-LD 1.1 as a W3C Recommendation, intended to supersede JSON-LD 1.0 (JSON-LD 1.1).
- Microdata. MDN states that microdata is part of the WHATWG HTML Standard (MDN's microdata guide).
- RDFa. RDFa Core 1.1 is an Editorial Revision of the W3C Recommendation published on 22 August 2013, and it specifies only a syntax, relying on vocabularies that others define (RDFa Core 1.1). The RDFa Working Group published the Primer as a Working Group Note (RDFa Primer).
What survives Cloudflare's Markdown conversion
A client that adds an Accept header with text/markdown, on a zone with Markdown for Agents enabled, gets Markdown back: Cloudflare fetches the original HTML from the origin and converts it before serving it (Cloudflare's documentation). Cloudflare Markdown for Agents keeps JSON-LD blocks and appends them in a fenced json block. That block is emitted only when the source HTML contains JSON-LD, and several JSON-LD scripts on one page are concatenated within the same block, each on its own line. JSON-LD is the only <script> content preserved in the output. Pre-processing strips other script and style content along with non-content elements such as headers, footers and navigation.
Related: How to add JSON-LD agents use
How to choose
For Google Search, the format question is mostly settled by maintenance. Google recommends a format that is easiest for you to implement and maintain, which in most cases is JSON-LD, and says all three formats are equally fine for Google as long as the markup is valid and properly implemented per the feature's documentation (Google's introduction). Google can also read JSON-LD that is dynamically injected into a page, such as by JavaScript code or embedded widgets in a content management system.
Whichever syntax you use, mark up only what the page shows. Google's guidelines list JSON-LD, Microdata and RDFa as the formats for rich-result eligibility and tell you not to mark up content that is not visible to readers: if the JSON-LD describes a performer, the HTML body must describe that same performer (Google's guidelines). schema.org's guide gives the same general rule, excluding content in hidden divs and other hidden page elements (schema.org's guide).
Related: How to add JSON-LD agents use
Check the result with Google's Rich Results Test during development and the Rich result status reports after deployment; Google warns that pages might break after deployment due to templating or serving issues (Google's introduction).
Sources
- schema.org: Getting started with schema.org using Microdata https://schema.org/docs/gs.html, read 18 November 2026
- W3C: JSON-LD 1.1 https://www.w3.org/TR/json-ld11/, read 18 November 2026
- WHATWG: HTML Standard: Microdata https://html.spec.whatwg.org/multipage/microdata.html, read 18 November 2026
- MDN: Microdata https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Microdata, read 18 November 2026
- W3C: RDFa 1.1 Primer https://www.w3.org/TR/rdfa-primer/, read 18 November 2026
- W3C: RDFa Core 1.1 https://www.w3.org/TR/rdfa-core/, read 18 November 2026
- Google Search Central: Intro to how structured data markup works https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data?hl=en, read 18 November 2026
- Google Search Central: General structured data guidelines https://developers.google.com/search/docs/appearance/structured-data/sd-policies?hl=en, read 18 November 2026
- Cloudflare: Markdown for Agents https://developers.cloudflare.com/fundamentals/reference/markdown-for-agents/, read 18 November 2026
Last reviewed 18 November 2026