In short. WebPage structured data describes a web page and can connect it to its primary entity and containing WebSite.
Definition: Schema.org defines
WebPageas a web page. WebPage structured data describes that page and can express its relationship to its main subject and to the website containing it.
Key facts
- Schema.org's WebPage definition recommends explicitly declaring the type when page properties such as
breadcrumbare specified. - Schema.org's mainEntity property identifies the primary entity described by a page or another creative work.
- Schema.org's mainEntityOfPage property expresses the inverse relationship, from that entity to the page describing it.
- Schema.org's isPartOf property connects a creative work to a containing item or creative work; its inverse is
hasPart.
What identifies the page?
JSON-LD is a JSON format for linked data. A node is an identifiable item in that data. The W3C's JSON-LD specification uses @id to identify a node and @type to state its type. A WebPage object can therefore carry its own identifier alongside "@type": "WebPage".
Schema.org defines url as the URL of the item. The fields serve different roles: @id identifies the node in the linked data, while url supplies a URL associated with the described item. Schema.org's cafe example uses a page URL as the WebPage identifier and nests a separate Restaurant object under mainEntity.
How does a page connect to its subject and website?
An entity is the thing being described, such as a restaurant. Schema.org's mainEntity example describes a WebPage whose primary entity is a Restaurant named Cath's Cafe. The example assigns the page its own type and puts the restaurant's name and business details inside the Restaurant object.
The reverse direction uses mainEntityOfPage: the entity points to a page for which it is the main subject. Its expected value is a creative work or a URL.
A WebSite represents a collection of related pages and other items, typically served from a single domain. Applying isPartOf to the WebPage expresses membership in that containing website. This relationship answers where the page belongs; mainEntity answers what it primarily describes.
What does the markup look like?
This illustrative adaptation of Schema.org's Cath's Cafe example retains the page identifier and main subject, omits business details, and adds a containing WebSite using isPartOf. It represents example data.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"@id": "http://cathscafe.example.com/",
"url": "http://cathscafe.example.com/",
"isPartOf": {
"@type": "WebSite",
"@id": "http://cathscafe.example.com/#website"
},
"mainEntity": {
"@type": "Restaurant",
"name": "Cath's Cafe"
}
}
</script>
The W3C's embedding instructions place JSON-LD in an HTML script element with type="application/ld+json". Here, the Restaurant is the page's primary subject, and the WebSite is the containing collection.
How is WebPage markup checked?
As of 17 October 2026, Google's structured data testing guidance directs generic Schema.org validation to the Schema Markup Validator. It tests Schema.org markup embedded in pages without Google feature specific warnings. The same guidance assigns the Rich Results Test to checking which Google rich results the markup can generate.
Related terms
FAQ
Does mainContentOfPage identify the same kind of thing as mainEntity?
Schema.org's WebPage property table expects a WebPageElement for mainContentOfPage, identifying a page element as the main subject. mainEntity can point to a Thing, including the Restaurant in Schema.org's example.
Can I describe the relationship from the subject's side?
Yes. You can use mainEntityOfPage on the subject, with the describing page as its value. Schema.org's Restaurant example uses the cafe's page URL for this property.
Sources
- Schema.org, "WebPage", undated
- Schema.org, "mainEntity", undated
- Schema.org, "mainEntityOfPage", undated
- Schema.org, "isPartOf", undated
- Schema.org, "url", undated
- Schema.org, "WebSite", undated
- W3C, "JSON-LD 1.1", 16 July 2020
- Google Search Central, "Test your structured data", undated
Check how a page reads to answer engines. Open the GEO score analyzer