w3resource

Schema.org WebPage Type tutorial

WebPage

In this page, we have discussed WebPage type of Schema.org in detail.

Hierarchy

Thing > CreativeWork > WebPage

WebPage specifies a webpage. Since every webpage is supposed to be declared as WebPage, properties of WebPage shall be used along with.

Properties

The following table described the properties of WebPage.

Properties Which type should be used Description
breadcrumb Text An array of links. This helps a user to navigate the website. And also helps the user to understand which tier / page of the website (s)he is visiting.
isPartOf CollectionPage This refers the collection to which the item belongs.
mainContentOfPage WebPageElement IF used, indicates that the associated content is the main content of the page.
primaryImageOfPage ImageObject Refers the main image of the page.
significantLinks URL Refers the most significant link of the page.

Example

Example of WebPage without Microdata

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset=utf-8>
<title>example code WebPage Type without Microdata</title>
</head>
<body>
<p><a href="Movies.html">Movies</a> > <a href="SciFi.html">Science Fiction</a> > <a href="Rise-of-the-Planet-of-the-Apes.html">Rise of the Planet of the Apes</a></p>
<div>
<h1>Rise of the Planet of the Apes</h1>
<p>Director : Rupert Wyatt</p> <p>Producer : Chermin Entertainment, Twentieth Century Fox Film Corporation.</p>
<p>Key Cast : </p>
<ul>
<li>James Franco as Will Rodman</li>
<li>Freida Pinto as Caroline Aranha</li>
<li>John Lithgow as Charles Rodman</li>
<li>Chelah Horsdal as Irena</li> </ul>
<p>Genre : Science Fiction</p>
<p>Motion Picture Rating : MPAAA</a>
<p>Tags : Evolution Ends. Revolution Begins</p>
</div>
</body>
</html>

Example of WebPage with Microdata

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset=utf-8>
<title>example code of WebPage with Microdata</title>
<meta name="author" content="https://www.w3resource.com/authors.php"></head>
<body itemscope itemtype="http://schema.org/WebPage">
<div itemprop="breadcrumb">
<a href="Movies.html">Movies</a> > 
<a href="SciFi.html">Science Fiction</a> > 
<a href="Rise-of-the-Planet-of-the-Apes.html">Rise of the Planet of the Apes</a>
</div>
<div itemscope itemtype="http://schema.org/Movie">
<h1 itemprop="name">Rise of the Planet of the Apes</h1>
<span itemprop="description">During experiments to find a cure for Alzheimers disease, a genetically-enhanced chimpanzee uses 
its greater intelligence to lead other apes to freedom.</span>
<p>Director:</p>
<div itemprop="director" itemscope itemtype="http://schema.org/People">
<span itemprop="name">Rupert Wyatt</span>
</div>
<p>Actors:</p>
<div itemprop="author" itemscope itemtype="http://schema.org/People">
<span itemprop="name">Ted Elliott</span>
</div>
<div itemprop="actors" itemscope itemtype="http://schema.org/People">
<span itemprop="name">James Franco</span>,
</div>
<div itemprop="actors" itemscope itemtype="http://schema.org/People">
<span itemprop="name">Freida Pinto</span>,
</div>
<div itemprop="actors" itemscope itemtype="http://schema.org/People">
<span itemprop="name">John Lithgow</span>
</div>
<div itemprop="actors" itemscope itemtype="http://schema.org/People">
<span itemprop="name">Chelah Horsdal</span>
</div>
</div>
</body>
</html>

Previous: Schema.org MusicRecording Type tutorial
Next: Schema.org Book type tutorial

Test your Programming skills with w3resource's quiz.



Follow us on Facebook and Twitter for latest update.