An Introduction to Structured Data Using Microformats
In a previous article, we discussed how the Semantic Web relies upon markup languages that tag Web content so it is easier for machines to interpret. This can be accomplished in a number of ways, including tagging content as structured data or linked data.
This article provides an introduction to marking up your content as structured data using microformats.
Microformats for Structured Data
Microformats are one of the standard markup formats used to create structured data. Like any markup language, they consist of tags and attributes that are used to “mark up” your Web content so that a search engine can recognize the content as structured data.
Content that is typically marked up using this standard includes contact and location information, reviews, products, and events. To transform your data into structured data using microformats, you simply add some additional classes and tags to your existing HTML, adhering to the microformats standard.
To demonstrate, let's look at the “hCard” format. This format is used for marking up information about people, companies, organizations, and places. Here is how the marked-up content will look within the HTML of your Web page:
<div id="hcard-Deltina-Hay" class="vcard">
<a class="url fn" href="http://www.plumbwebsolutions.com">Deltina Hay</a>
<div class="org">PLUMB Web Solutions</div>
<a class="email" href="mailto:dg@plumbws.com">dg@plumbws.com</a>
<div class="adr">
<div class="street-address">P.O. Box 242</div>
<span class="locality">Austin</span>
<span class="region">Texas</span>
<span class="postal-code">78767</span>
<span class="country-name">USA</span>
</div>
<div class="tel">512-555-9999</div>
</div>
And this is how it will appear on your Website:
Deltina Hay
PLUMB Web Solutions
dg@plumbws.com
P.O. Box 242
Austin , Texas , 78767 USA
512-555-9999
To the naked eye, there is nothing special about this content. It is nothing more than your contact information with links. Search engines and Internet browsers, however, will now be able to interpret the content as structured data (specifically structured contact and location information about you and your company) and display it or use it accordingly. All you need to do is mark up your existing contact information using the microformats standards.
Microformats.org has a lot of resources to help you out, including an hCard creator that you can use to generate code similar to that in our example.
Continued on the next page




Follow Technorati