Microformats are a fundamental building block of the Indieweb. “Designed for humans first and machines second, microformats are a set of simple, open data formats built upon existing and widely adopted standards”. They are a set of tags which one may add to one’s HTML to indicate semantic rather than formatting information. For instance, consider mentioning a person in your prose. In plain text, one could say:
Barnaby Walters
and in HTML, to indicate a location on the internet, one could say:
<a href="http://waterpigs.co.uk">Barnaby Walters</a>
Microformats2 adds additional information to that link, the information that this names a person, by adding a particular class to the HTML element:
<a class="h-card" href="http://waterpigs.co.uk">Barnaby Walters</a>
Microformats allow you to build structure, for instance giving this reference to a person both a location on the web and a photo:
<div class="h-card"> <p><img class="u-photo" href="/me.png" alt="" /></p> <p class="p-name"><a href="u-url" href="http://waterpigs.co.uk">Barnaby Walters</a></p> </div>
You can find a complete vocabulary here, and an on-line Microformats parser here.
Of particular note is that, as static site authors, the onus is on us to mark-up our HTML with microformts. We’ll use the page template in the Org Export back-end to do so (see below).
The Microformats Wiki is here and mf2py is a commonly used Python library for parsing Microformats.