microdata consists of a set of attribute extensions to Microformats in HTML5:
itempropattribute is a more specific version of
class, for field names
subjectattribute allows semantically linking within the page. Conceptually similar to the include-pattern.
itemrefattribute allows including properties elsewhere on the page that are not descendants of
itemscope. Takes space-separated ids (for example
itemref="address phone"would include the elements with
id="phone"). Conceptually similar to the include-pattern.
contentattribute on the
metaelement can be used to include invisible data that is not part of the content. As current browsers move
<head>, make sure to include via
itemref. Conceptually similar to the 'value-title' feature of the Value Class Pattern.
itemscopeattribute identifies blocks to be marked as structured data. Conceptually similar to the mfo-examples brainstorming.
itemtypeattribute to specify the type for an item (for example:
For common semantics on the web (e.g. people+organizations, events, reviews, syndicated content), microformats are still simpler and easier than microdata, and are already well implemented across numerous tools and services.
For uncommon, rare, experimental, or one-off semantics, microdata offers a simpler and easier to understand solution than alternatives that use namespaces considered harmful like XML/RDF/RDFa. Developers should consider microdata as another way of expressing semantics that they may otherwise use poshformats for.
microdata didn't happen overnight. Much of the design and simplicity of microdata is based on years of work on microformats principles deliberately designed to help guide and create simpler, more usable and accessible solutions. It happened so quickly because Ian Hickson designed microdata based upon years of work by both the microformats community, and the concept of using reverse-domain-names as unique qualifiers (popularized perhaps by Java programming language naming conventions).
I think there are some very clever ideas in general purpose microdata, it has a lot of potential, and despite being a bit more abstract than microformats, still much simpler/easier to explain to web designers/developers/programmers than any form of RDF.
General microdata may be the right solution to the general purpose data representation problem that microformats specifically chose not to work on.
- Tantek 17:42, 22 August 2009 (UTC)
Separate from the microdata specification, there are a number of microdata vocabularies, based on microformats and previous formats like vCard and iCalendar.
microdata vCard vocabulary
Formerly documented as a separate specification at http://dev.w3.org/html5/mdvcard/, the microdata vCard vocabulary is currently available as part of WHATWG additions to HTML5.
- Recommendation: use hCard 1.0 directly instead, taking into account:
hCard 1.0.1 (under development) is incorporating these errata.
- Avoid the "microdata vCard vocabulary" as in many ways it is an out-of-date fork/snapshot of hCard, even though portions of it appear to based directly on the vCard RFC. as well.
- Avoid Google’s Rich Snippets vocabularies (Person and Organization), which are also forks of hCard/vCard, and are only implemented by Google currently.
microdata vEvent vocabulary
Formerly documented as a separate specification at http://dev.w3.org/html5/mdvevent/, the microdata vEvent vocabulary is currently available as part of WHATWG additions to HTML5.
- Recommendation: use hCalendar 1.0 directly instead, taking into account:
hCalendar 1.0.1 (under development) is incorporating these errata.
- Avoid the "microdata vEvent vocabulary" as in many ways it is an out-of-date fork/snapshot of hCalendar's vevent root class name and applicable properties, even though portions of it appear to based directly on the iCalendar RFC.
- Avoid Google’s Rich Snippets vocabulary (Event), which is also a fork of hCalendar/iCalendar, and are only implemented by Google currently.
microdata Licensing Works vocabulary
Formerly documented as a separate specification at http://dev.w3.org/html5/mdwork/, the microdata Licensing Works vocabulary is currently available as part of WHATWG additions to HTML5.
The Licensing microformat work provides a potential microformat alternative to the microdata Licensing Works vocabulary.
Please see: Licensing Brainstorming and provide feedback.
microformats in microdata
For those that are ok with going with an Microformats in HTML5 only solution, it may be interesting to consider and document a consistent way to use microformats and microformats vocabulary in microdata.
A possible simple implementation could look like this:
<!DOCTYPE html> <html lang="en"> <head> <title>Corey Mwamba</title> </head> <body> <section item="vcard" itemtype="http://microformats.org/profile/hcard" itemscope> <h1 itemprop="fn">Corey Mwamba</h1> <div itemprop="adr"> <p itemprop="street-address">56 Nowhere Road</p> <p itemprop="locality">Nowhere</p> <p itemprop="postal-code">NO1 6QT</p> </div> <a href="http://www.coreymwamba.co.uk/" itemprop="url">My web site</a> </section> </body> </html>
And here's an simple hCalendar example:
<!DOCTYPE html> <html lang="en"> <head> <title>Web 2.0 Conference</title> </head> <body> <div item="vevent" itemtype="http://microformats.org/profile/hcalendar" itemscope> <a itemprop="url" href="http://conferences.oreillynet.com/pub/w/40/program.html"> http://conferences.oreillynet.com/pub/w/40/program.html </a> <span itemprop="summary">Web 2.0 Conference</span>: <time itemprop="dtstart" datetime="2005-10-05">October 5</time>- <time itemprop="dtend" datetime="2005-10-07">7</time>, at the <span itemprop="location">Argent Hotel, San Francisco, CA</span> </div> </body> </html>
The advantage is that no major re-wiring in thinking is required to adjust real-world usage - but would parsers be able to deal with the change? And in fact, would this require a recasting of microformats themselves? --Epicurious 19:16, 16 August 2010 (UTC)
Since the introduction of XMDP, web authors have been able to define their specific uses of rel attribute values and class names.
(needs expansion with examples) ...