JSON-LD
The recommended format for adding structured data to web pages, embedded as a script tag in the HTML head.
JSON-LD (JavaScript Object Notation for Linked Data) is a W3C standard for encoding Linked Data using JSON. It is Google's preferred format for structured data because it is easy to add without modifying visible HTML, easy to validate, and easy to generate programmatically.
A JSON-LD block looks like: <script type="application/ld+json">{ "@context": "https://schema.org", "@type": "Article", ... }</script>. It can be placed anywhere in the <head> or <body> of the page. Multiple separate JSON-LD blocks on a single page are valid and Google will read them all.
Compared to Microdata (which requires attributes inline on HTML elements) and RDFa (similar), JSON-LD decouples the structured data from the HTML structure, making it cleaner and easier to manage. It is the only format where the structured data can differ from what is visually rendered — though Google requires the markup to represent real content on the page.