: Can I mix Microdata and JSON-LD on the same page for different entity My website is using JSON-LD and Microdata. For example, in BreadcrumbList, I have used Microdata format, and for others
My website is using JSON-LD and Microdata.
For example, in BreadcrumbList, I have used Microdata format, and for others (like Organization, TouristAttraction) JSON-LD has been used.
Can I mix Microdata and JSON-LD on the same page for different entities or should I go with only one format?
More posts by @Berryessa370
1 Comments
Sorted by latest first Latest Oldest Best
It should be fine to use different syntaxes on the same page.
It has one drawback, though: If you want to connect entities specified in different syntaxes, you can’t nest them. You have to use URIs instead.
Drawback example
You can connect a BreadcrumbList to a WebPage with the breadcrumb property.
When using only one syntax, you can simply nest the items:
<!-- Microdata only -->
<div itemscope itemtype="http://schema.org/WebPage">
<div itemprop="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">
</div>
</div>
<!-- JSON-LD only -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebPage",
"breadcrumb":
{
"@type": "BreadcrumbList"
}
}
</script>
But if you mix syntaxes, you have to use URIs instead:
<!-- Microdata, giving the entitiy an URI with the 'itemid' attribute -->
<div itemscope itemtype="http://schema.org/BreadcrumbList" itemid="#page-breadcrumbs">
</div>
<!-- JSON-LD, referencing the URI "#page-breadcrumbs" which is specified in the Microdata -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebPage",
"breadcrumb":
{
"@type": "BreadcrumbList",
"@id": "#page-breadcrumbs"
}
}
</script>
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.