JSON-LD and Structured Data Formats
What we will go through
- The three structured data formats
- How to read a JSON-LD block
- How @id and @graph connect entities
- Which format to recommend
Short answer
Structured data comes in three formats: JSON-LD, a separate script block; Microdata, attributes inside HTML tags; and RDFa, a similar attribute-based method. Google supports all three but recommends JSON-LD because it is easier to add, read, and maintain. Audits often find mixed formats, which increases the risk of duplicate or conflicting markup.
You will meet three formats in audits. Being able to read each one quickly is a core auditing skill.
JSON-LD (recommended)
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"@id": "https://www.example.ph/#business",
"name": "Mayon View Cafe",
"telephone": "+63 917 000 0000",
"address": {
"@type": "PostalAddress",
"streetAddress": "Rizal Street",
"addressLocality": "Legazpi City",
"addressRegion": "Albay",
"addressCountry": "PH"
}
}
</script>
Read it top down: @type says what it is, each key is a property, nested objects have their own @type.
Microdata
<div itemscope itemtype="https://schema.org/LocalBusiness">
<h1 itemprop="name">Mayon View Cafe</h1>
<span itemprop="telephone">+63 917 000 0000</span>
</div>
RDFa
Uses vocab, typeof, and property attributes. Less common, mostly in older CMS themes.
Connecting entities
Large sites use @graph to hold several entities (Organization, WebSite, WebPage, Product) and @id to link them, so the Product can say its brand is the Organization’s @id. SEO plugins like Yoast and Rank Math output this pattern.
Practice: which format?
Sort each item into the right group.
-
<script type="application/ld+json">
Answer: JSON-LD.
-
itemprop="price"
Answer: Microdata.
-
typeof="Product"
Answer: RDFa.
-
"@graph": [ ... ]
Answer: JSON-LD.
-
itemscope itemtype="https://schema.org/Review"
Answer: Microdata.
Common mistakes
- Theme Microdata plus plugin JSON-LD describing the same product twice.
- JSON-LD only injected by tag managers without checking rendering.
- Broken JSON from a missing comma or quote.
Your action
Next, you will find structured data across a whole website.
Key terms
- JSON-LD
- Structured data written as JSON inside a <script type="application/ld+json"> tag.
- Microdata
- Structured data added with itemscope, itemtype, and itemprop attributes on HTML elements.
- @id
- A unique identifier for an entity, letting other blocks reference it.
- @graph
- A JSON-LD array holding several connected entities in one block.
Questions beginners ask
Can JSON-LD be added by JavaScript?
Yes, Google can read it after rendering. Server-rendered JSON-LD is more reliable and visible to non-rendering crawlers.
Is Microdata wrong?
No, it is valid. It is harder to maintain because it is tied to the HTML layout.
Can I mix formats on one page?
You can, but it often creates duplicate entities. Prefer one format per entity.
Where should JSON-LD go?
In the head or body. Location does not matter to Google.
Related lessons
Want someone to handle SEO for your business while you learn? The team at Remar Digital can help.