Google’s Rich Snippet Testing Tool
Last week we discussed how the Semantic Web relies upon markup languages that tag Web content, making it easier for machines to interpret. This can be accomplished in a number of ways, including tagging content as structured data or linked data.
Today we’ll take a look at 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:[email protected]”>[email protected]</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
[email protected]
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.
Other basic formats you may want to take advantage of right away include:
• hCalendar: For marking up events (microformats.org also has an hCalendar creator).
• hProduct: For marking up your products and services.
• hReviews: For marking up reviews. (microformats.org also has an hReview creator)
Structured data in action: Google Rich Snippets
As we also discussed in last week’s article, Google is using structured data to display Web content in search results using what they call “Rich Snippets.” The Rich Snippets feature will check a web page for structured data and display it accordingly in search results. Here is an example from Google’s blog, showing the search results of a page whose content is marked up with the hReviews format:
Most of the time optimization efforts for semantic search take place behind the scenes, but Rich Snippets is a way you can actually see tangible results right away.
Google also has a Rich Snippets testing tool you can use to check the content of your page to ensure your marked-up content is compliant. See the image at the top of this post for results from the page we placed our hCard example code onto.
If there are any errors in the mark-up, the tool will point them out.
Using microformats to mark up simple content as structured data is not a difficult task as demonstrated here, but if you have a lot of relevant content to mark up like ongoing reviews or a lot of products, you should add microformat classes and styles directly into your existing CSS stylesheets. You can use tools like Oomph, a microformats toolkit, to help undertake the task.
Upcoming articles in this series will cover how to use the RDFa markup standard for structured data as well as an introduction to linked data.
This article first published as An Introduction to Structured Data Using Microformats on Technorati.Deltina Hay, a partner in Socialmedia.biz, is an author and educator who develops online curricula on social media and other Internet marketing topics. She also helps businesses prepare their content for semantic search and big data analysis. Contact her, follow her on Twitter and Google Plus, or leave a comment below.
Leave a Reply