Answer the question
In order to leave comments, you need to log in
Where and how to place microdata on a page in JSON-LD format?
For a number of reasons, I decided to convert the micro-markup to the JSON-LD format (I'm tired of the mess of additional tags on the page), but I can't figure out where to place the code on the page and whether it is possible to combine several formats in one script. I propose to consider accommodation options.
Input data: there are several blocks on the page (article, person, video, and others).
Option number 1
Place immediately above or below each script block.
<div>
<div class="foto">фото</div>
<div class="position">должность</div>
<div class="address">адрес</div>
<div class="city">город</div>
</div>
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Person",
"name": "Иннокентий",
"jobTitle": "Депутат",
"address": {
"@type": "PostalAddress",
"addressLocality": "Москва",
"addressRegion": "ЦФО"
}
}
</script>
<!-- Далее идут блоки в таком же порядке:
сначала HTML код блока и за ним — микроразметка-->
<div>блок персоны</div>
<div>блок видео</div>
<!-- тут много другого кода -->
<script type="application/ld+json">микроразметка блока персоны</script>
<script type="application/ld+json">микроразметка блока видео</script>
<div>блок персоны</div>
<div>блок видео</div>
<!-- тут много другого кода -->
<script type="application/ld+json">
микроразметка блока персоны
микроразметка блока видео
</script>
Answer the question
In order to leave comments, you need to log in
Hey!
This is how EA.COM does it.
That is, you can describe all the entities that are on the page, you can in 1 script and 1 time
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question