What is the difference between the Schema.org properties isPartOf
and hasPart
and when to use the one instead of the other?
Asked
Active
Viewed 1,706 times
1

unor
- 92,415
- 26
- 211
- 360

Morten Schroeder
- 11
- 2
-
2If you had a cheese sandwich then cheese is a part of the cheese sandwich, and a cheese sandwich has a part which is cheese. – Andrew Morton Jan 05 '17 at 21:26
1 Answers
4
As noted on their pages, they are inverse properties.
As an example, let’s take a webpage that is part of a website. You could then state one of these:
WebSite
hasPart
WebPage
WebPage
isPartOf
WebSite
It doesn’t matter which one you choose. (But there might of course be consumers that only recognize one of these properties.)
Note: Most of the time, Schema.org doesn’t define an inverse equivalent for a property. For example, there is author
, but no . This is because you can use every property for both directions, with the help of the syntax:authorOf
Microdata:
itemprop-reverse
(non-standard, which is one of the reasons to prefer RDFa over Microdata)
(example)

unor
- 92,415
- 26
- 211
- 360