3

I'm trying to generate Microdata markup (making use of Schema.org). I know that JSON-LD has a "@id" which helps reference that whatever data is.

Is there a similar thing for Microdata? As I wouldn't want to copy and paste all the data.

3

Yes, the itemid attribute (W3C, WHATWG).

Example:

<div itemscope itemtype="http://schema.org/Person" itemid="/team/alice#i">
  <!-- this person (not the page about this person) has the URI "/team/alice#i" -->
</div>

<div itemscope itemtype="http://schema.org/Book">
  <link itemprop="author" href="/team/alice#i" />
</div>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.