Microformats 2

Stats

First brainstorming, hCard, hCalendar in .

So what are they?

A set of simple, open formats for adding semantic data to HTML (mainly using the class attribute).

What do they look like?

Barnaby Walters
<a href="http://waterpigs.co.uk">Barnaby Walters</a>
<span class="vcard"><a class="fn n url" href="http://waterpigs.co.uk">Barnaby Walters</a></span>

(more than 40 extra characters!)

With microformats-2:

Barnaby Walters
<a href="http://waterpigs.co.uk">Barnaby Walters</a>
<a class="h-card" href="http://waterpigs.co.uk">Barnaby Walters</a>

Only 15 extra characters.

1: Implied Properties

<a class="h-card" href="http://waterpigs.co.uk">Barnaby Walters</a>

2: Prefixes

<article class="h-entry">
	<h1><a class="p-name u-url" href="http://example.org/post">My Awesome Blog Post</a></h1>
		
	<p>Published <time class="dt-published">2013-01-23 20:54:31</time></p>
		
	<div class="e-content">
		<p>You know another great thing about microformats 2?</p>
		<p>No more bloody double-encoded HTML in RSS feeds!</p>
	</div>
</article>

3: Improved Semantics

Classic microformats often used existing schemas as-is, (e.g. VCARD => hCard, ATOM => hAtom).

How to use microformats 2 Today?

Start publishing!

Links

Creative Commons Licence Microformats-2 by Barnaby Walters is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

/

#