Skip to main content

Introduction to Microdata - SEO By Nesting Metadata In Existing Content

In this tutorial you will learn how to integrate Microdata into your website. Microdata enables search engines, web crawlers, and browsers to extract and process information from your web page and use it to provide a richer browsing experience for users.




We will be referencing the W3C HTML Microdata Nightly website and the Google Structured Data Testing Tool.
We will also be using the John Doe - Resume free template html file, form an earlier post, offered for download here.



What is Microdata?


Compared to using using RDFa and Microformats, Microdata is an attempt to provide a simpler way of annotating HTML elements with tags. A supporting vocabulary is used to describe item and name-value pairs for assigning property values. Microdata allows nested groups of name-value pairs to be added to documents, in parallel with the existing content.



Microdata Syntax


In the John Doe - Resume file you have downloaded from the link above you will see the following code:

<!DOCTYPE html>
<html lang="en">
<head>
...
</head>
<body itemscope itemtype="http://data-vocabulary.org/Person">
<nav class="navbar">
...
</nav>
<div class="container">
<div class="row">
<div class="col-md-9">
<h1 class="name" itemprop="name"><span itemprop="givenName">John</span>&nbsp;<span itemprop="familyName">Doe</span></h1>
<h3 class="title" itemprop="title">Project Manager</h3>
<br />
<p class="header-row" itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address">
<span itemprop="region">Address Region</span>, <span itemprop="locality">City</span>, <span itemprop="country">Country</span>
</p>
<p class="header-row">
<span itemprop="email">john.doe@mail.com</span>
</p>
<p class="header-row">
<span itemprop="telephone">(+01) 123 456 789</span>
</p>
</div>
</div>
...
<div id="studies">
...
<dd itemprop="alumniOf">
Name of University
</dd>
...
</div>
...

</div>
</div>
<footer style="text-align:center; padding-top:40px">
...
</footer>
...
</body>
</html>


As you can see the body uses itemscope to create an item. The item is then given the Person type.

Now we can add attributes to individual parts of the content. For example itemprop="name".
We can embed one or more attributes inside of others. If you look at the code you will see that the name attribute contains givenName and familyName, the same goes for the address attribute.



Microdata Testing


For testing your code I recommend using the Google Structured Data Testing Tool. Here you can see the output for the John Doe - Resume file used in this tutorial.




In the above example name, address, e-mail, telephone and alimniof were useful attributes but you can use others as well. You can find detailed information about Microdata syntax on the W3C HTML Microdata Nightly website.

The most commonly used item type libraries used for data improvement:
  • Reviews
  • People
  • Products
  • Businesses and organizations
  • Recipes
  • Events
  • Video 

How will you use Microdata in your future projects? Leave your comments and suggestions below.

Comments

Popular posts from this blog

iPhone 5 Rumor Roundup

Release Date The latest rumors regarding the iPhone 5 indicate that the official release date will be officially announced during the next Apple event which is to be held on September 12th 2012. According to Verizon CFO, Fran Shammo, Apple (AAPL) will stick to last year's release date and launch the iPhone 5 in October 2012. Although during the 2012 WWDC we had the opportunity to get some more details about iOS 6, no hardware specifications were released. source - 9to5mac.com Larger Screen The iPhone 5 is rumoured to have a larger, 4 inch retina display. source - Apple.pro Nano SIM According to the Financial Times, mobile carriers in Europe are stocking up on Nano SIM cards. This might be related to the release of the next generation iPhone. Smaller Dock Connector Another wide spread rumour is that Apple will release the iPhone 5 with a smaller, 8 pin dock connector. This means that new cables will be available for  new Apple devices released in the future. Did you hear any new rum...

Single Page HTML5 CSS3 Business Card Template 2.0

After seeing a huge interest in the Single Page Business Card Tutorial  i decided to create a Single Page Business Card 2.0 Template. Besides listing your title and contact details the 2.0 template also has some nice CSS3 transition effects, is available in 4 colors and the best part: IT'S FREE FOR DOWNLOAD . Demo Download CSS3 Transition Effect On hover the Name/Title block and the Contact Details blocks slide out vertically showing a centered block containing name and position, social and contact icons. Red Template Demo Blue Template Demo Yellow Template Demo Green Template Demo

HTML Codes for Romanian Characters

Character Simple Code Numerical Code Hex Code Ă &#258; &#x102; ă &#259; &#x103; Â &Acirc; &#194; &#xC2; â &acirc; &#226; &#xE2; Î &Icirc; &#206; &#xCE; î &icirc; &#238; &#xEE; Ș &#x218; &#xDA; ș &#x219; &#xDB; Ş &#350; &#x15E; ş &#351; &#x15F; Ţ &#354; &#x162; ţ &#355; &#x163;