Microformats and Microdata

Definition

Microformats and microdata are a way to make certain data machine-readable (by say Google or Bing) by adding semantic attributes.

There are two competing standards, but both work in a nearly identical fashion. Google is throwing its weight behind the Microdata format, but has agreed to also index Microformats.

Microdata

Craig Creeger, President

Pixel Pro, Inc.
1225 Dawn Lane Woodbury, MN 55125 USA

(651) 361-0457

craig@pixelpro.biz

Microdata is a W3C Draft Specification and a good description of how to use it can be found on schema.org.

The formatted “card” on the right was created with the following microdata markup:

<div itemscope itemtype="http://schema.org/Organization">
<p itemprop="founder" itemscope itemtype="http://schema.org/Person">
	<a href="http://pixelpro.biz">
	<span itemprop="givenName">Craig</span> 
	<span itemprop="familyName">Creeger</span></a>, 
	<span itemprop="jobTitle">President</span>
</p>
<p><span itemprop="legalName">Pixel Pro, Inc.</span><br>
<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
	<span itemprop="streetAddress">1225 Dawn Lane</span> 
	<span itemprop="addressLocality">Woodbury</span>, 
	<span itemprop="addressRegion">MN</span> 
	<span itemprop="postalCode">55125</span> 
	<span itemprop="addressCountry">USA</span>
</span></p>
<p itemprop="telephone">(&#054;&#053;&#049;)&#032;&#051;&#054;&#049;&#045;&#048;&#052;&#053;&#055;</p>
<p><a itemprop="email" href="mailto:&#099;&#114;&#097;&#105;&#103;&#064;&#112;&#105;&#120;&#101;&#108;&#112;&#114;&#111;&#046;&#098;&#105;&#122;">&#099;&#114;&#097;&#105;&#103;&#064;&#112;&#105;&#120;&#101;&#108;&#112;&#114;&#111;&#046;&#098;&#105;&#122;</a></p>
</div>

hCard Microformat Example

Craig Creeger, President

Pixel Pro, Inc.
1225 Dawn Lane Woodbury, MN 55125 USA

(651) 361-0457

craig@pixelpro.biz

The formatted “card” on the right was created with the following microformats markup:

<head>

<link rel="profile" href="http://microformats.org/profile/hcard">

</head>

 

<div class="vcard halfWidthBox" id="hcard-Craig-Creeger">
<p><a class="url fn" href="http://pixelpro.biz"><span class="given-name">Craig</span> <span class="family-name">Creeger</span></a>, <span class="title">President</span></p>
<span class="org">Pixel Pro, Inc.</span><br>
<span class="adr"> <span class="street-address">1225 Dawn Lane</span> <span class="locality">Woodbury</span>, <span class="region">MN</span> <span class="postal-code">55125</span> <span class="country-name">USA</span></span>
<p class="tel">(&#054;&#053;&#049;)&#032;&#051;&#054;&#049;&#045;&#048;&#052;&#053;&#055;</p>
<p><a class="email" href="mailto:&#099;&#114;&#097;&#105;&#103;&#064;&#112;&#105;&#120;&#101;&#108;&#112;&#114;&#111;&#046;&#098;&#105;&#122;">&#099;&#114;&#097;&#105;&#103;&#064;&#112;&#105;&#120;&#101;&#108;&#112;&#114;&#111;&#046;&#098;&#105;&#122;</a></p>
</div>