w3resource logo


WebPage - Schema.org tutorial

Schema.org WebPage Type tutorial

Secondary Nav

Introduction

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

Hierarchy

Thing > CreativeWork > WebPage

Description

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.

PropertiesWhich type should be usedDescription
breadcrumbTextAn 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.
isPartOfCollectionPageThis refers the collection to which the item belongs.
mainContentOfPageWebPageElementIF used, indicates that the associated content is the main content of the page.
primaryImageOfPageImageObjectRefers the main image of the page.
significantLinksURLRefers 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>


Join our Question Answer community to learn and share your programming knowledge.

Help the community:

Python: Fizzbuzz

C++: Decimal to binary conversion

JavaScript: Need Help in JavaScript

Python: Help me with this program