w3resource logo


MusicRecording - Schema.org tutorial

Schema.org MusicRecording Type tutorial

Secondary Nav

Introduction

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

Hierarchy

Thing > CreativeWork > MusicRecording

Description

MusicRecording specifies that associated content is about a musical track.

Properties

The following table described the properties of MusicPlaylist.

PropertiesWhich type should be usedDescription
byArtistMusicGroupAn artist who performed the musical track.
durationDurationThe duration of the track. It must be in ISO 8601 date format.
inAlbumMusicAlbumThe album which contains the track.
inPlaylistMusicPlaylist The playlist which contains the track.

Example

Example of MusicRecording without Microdata

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset=utf-8>
<title>example code MusicRecording Schema without Microdata</title>
</head>
<body>
<div>
<h1>Colonial Cousins</h1>
<ul>
<li>It's Gonna Be Alright. Duration : 6:53</li>
<li>Indian Rain. Duration : 6:33</li>
<li>Feel Alright. Duration : 5:59</li>
<li>Krishna. Duration : 5:50</li> </ul>
<p>Sa Ni Dha Pa. Duration : 5:05</p>
</div>
</body>
</html>

Example of MusicRecording with Microdata

<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset=utf-8>
<title>example code of MusicRecording with Microdata</title>
</head>
<body>
<div itemprop="tracks" itemscope itemtype="http://schema.org/MusicRecording">
<p itemprop="name">It's Gonna Be Alright</p>
<p>Duration: <meta itemprop="duration" content="PT4M5S">6:53</p> 
<p>From album: <span itemprop="inAlbum">Colonial Cousins</span></p>
</div>
<div itemprop="tracks" itemscope itemtype="http://schema.org/MusicRecording">
<p itemprop="name">Indian Rain</p>
<p>Duration: <meta itemprop="duration" content="PT4M5S">6:33</p> 
<p>From album: <span itemprop="inAlbum">Colonial Cousins</span></p>
</div>
<div itemprop="tracks" itemscope itemtype="http://schema.org/MusicRecording">
<p itemprop="name">Feel Alright</p>
<p>Duration: <meta itemprop="duration" content="PT4M5S">5:59</p> 
<p>From album: <span itemprop="inAlbum">Colonial Cousins</span></p>
</div>
<div itemprop="tracks" itemscope itemtype="http://schema.org/MusicRecording">
<p itemprop="name">Krishna</p>
<p>Duration: <meta itemprop="duration" content="PT4M5S">5:50</p> 
<p>From album: <span itemprop="inAlbum">Colonial Cousins</span></p>
</div>
<div itemprop="tracks" itemscope itemtype="http://schema.org/MusicRecording">
<p itemprop="name">Sa Ni Dha Pa</p>
<p>Duration: <meta itemprop="duration" content="PT4M5S">5:05</p> 
<p>From album: <span itemprop="inAlbum">Colonial Cousins</span></p>
</div>
</body>
</html>


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