A microformat is a web-based method for
implementing page semantics through the use of common HTML or XHTML tags
and the attributes within those tags (e.g., a <span>
tag with an appropriate class).
These tags convey metadata about the page or a particular object on the
page.
For instance, with the defined geo microformat
specification, we can use <span>
tags with an appropriate class, geo
, to
denote that we are specifying a geographical location:
<span class="geo"> <span class="latitude">45.512280</span>, <span class="longitude">-73.554390</span> </span>
Semantic markup is a core concept of technologies such as those we explored in the Open Graph protocol in Chapter 10. Microformats are simply a way of contributing to the semantic web.
This type of semantic markup helps when you are attempting to programmatically parse a site to extract as much usable information about its content as possible. If that page has all of its relevant information tagged through microformat specifications, then extracting its relevant data should be a simple task.
In addition to providing a way to extract data easily, tagging through microformat specifications allows the site developer to denote the relevant content of the page rather than having a site parser attempt to infer that information itself. This will ensure a consistent experience when the content is integrated at another location.
There are a number of microformat specifications available to help you implement microformat tagging on your sites:
To mark up Atom feeds within standard HTML.
To tag event-based information.
For contact information. This includes:
For address-based information.
For geographical coordinates such as latitude and longitude.
To mark up audio and video content.
To denote news-based content on a page.
For products.
For recipes and information relating to foodstuffs.
For resumes or CVs.
For any type of review content.
For distributed directory creation and inclusion.
For multimedia attachments to web pages.
For the specification of a copyright license.
An attempt to discourage third-party content spam.
For decentralized tagging.
For tagged links.
For social-based relationship data.
For lists and outlines.
Following these specifications will help you build semantically relevant pages and sites. For more information on microformat specifications, see http://microformats.org/.
3.144.37.38