Microformats
From Wikipedia, the free encyclopedia
Microformats are markup that allow expression of semantics in an HTML (or XHTML) web page. Programs can extract meaning from a standard web page that is marked up with microformats.
Existing XHTML (and HTML) standards allow for semantics to be embedded and encoded within them. This is done using specific HTML attributes:
- class
- rel
- rev
Adding microformats to a standard HTML web page allows machines to process HTML text and to possibly load data into remote databases. This would allow programs such as web crawlers to find items such as contact information, events, and reviews on web pages.
Contents |
[edit] Loosely coupled semantics
One of the advantages of semantic HTML and microformats (as opposed to XML-based semantics) is that semantic information can be loosely coupled. For example, consider the hCard contact information microformat:
<span class="vcard"> <span class="fn">Joe Blow</span> <span class="org">The Example Company</span> <span class="tel">604-555-1234</span> <a class="url" href="http://example.com/">http://example.com/</a> </span>
If one wanted to make this more aesthetically pleasing, say for an HTML e-mail signature, one could equally encode this as follows (while still retaining all the same semantics):
<pre class="vcard"> __________________ | | <span class="fn">Joe Blow</span> | <span class="tel">604-555-1234</span> |______________________________________________ <span class="org">The Example Company</span> <a class="url" href="http://example.com">http://example.com/</a> </pre>
Which would get rendered as:
__________________ | | Joe Blow | 604-555-1234 |______________________________________________ The Example Company http://example.com/
[edit] Specific microformats
Several microformats have been developed to enable semantic markup of particular types of information.
- hCalendar - for events
- hCard - for contact information
- hReview (spec) - for reviews
- hResume - for resumes or CVs
- rel-directory (spec) - for distributed directory creation and inclusion
- rel-pavatar (spec), a decentralized mechanism for assigning avatars to homepage owners.
- rel-nofollow, an attempt to discourage 3rd party content spam (e.g. comment spam).
- rel-tag (spec) - for decentralized tagging (Folksonomy)
- xFolk (spec) - for tagged links
- XFN - for social relationships
- XOXO - for lists and outlines
[edit] Uses of microformats
Using microformats within HTML code provides additional formatting and semantic data that can be used by applications. These could be applications that collect data about online resources, such as web crawlers, or desktop applications such as e-mail clients or scheduling software.
Several browser extensions, such as Tails Export, provide the ability to detect microformats within an HTML document and export them into formats compatible with contact management and calendar utilities, such as Microsoft Outlook.
Microsoft[1] and other software companies have expressed a desire to incorporate Microformats into upcoming projects.
[edit] See also
- GRDDL
- HTML
- intelligent agents
- RDFa RDF with attributes
- S5 file format
- Semantic Web
- Simple HTML Ontology Extensions (early semantic extensions to HTML done by University of Maryland, College Park)
- web crawlers
- XHTML
- XML