The isPartOf
property (and its inverse property: hasPart
) can be used to convey that a CreativeWork
is part of another CreativeWork
. One use case is a category page (example).
While a URL value could be used, the expected way is to provide CreativeWork
values (WebPage
is a more specific CreativeWork
):
<div itemscope itemtype="http://schema.org/WebPage">
<h1 itemprop="name">Child page</h1>
<p itemprop="isPartOf" itemscope itemtype="http://schema.org/WebPage">
<span itemprop="name">Parent page</span>
</p>
</div>
<div itemscope itemtype="http://schema.org/WebPage">
<h1 itemprop="name">Parent page</h1>
<p itemprop="hasPart" itemscope itemtype="http://schema.org/WebPage">
<span itemprop="name">Child page</span>
</p>
</div>
For a sports team
However, if you want to convey that a player is part of a team, you can’t use isPartOf
/hasPart
, as players and teams aren’t creative works. You would need a suitable property that can connect Person
and Organization
items.
Schema.org has suitable types and properties for this case now:
SportsTeam
Organization: Sports team.
athlete
A person that acts as performing member of a sports team; a player as opposed to a coach.
Example:
<div itemscope itemtype="http://schema.org/SportsTeam">
<ul>
<li itemprop="athlete" itemscope itemtype="http://schema.org/Person"></li>
<li itemprop="athlete" itemscope itemtype="http://schema.org/Person"></li>
<li itemprop="athlete" itemscope itemtype="http://schema.org/Person"></li>
</ul>
</div>
The athlete
property has no inverse property defined. If you want to specify this relation within a Person
item, you could either use the non-standard itemprop-reverse
attribute (example), or switch from using Microdata to RDFa (example) or JSON-LD (example).