From IndieWeb
(Redirected from Microformats)
Jump to: navigation, search

microformats are extensions to HTML for marking up people, organizations, events, locations, blog posts, products, reviews, resumés, recipes etc. Sites use microformats to publish a standard API that is consumed and used by search engines, aggregators, and other tools.

microformats2 (aka mf2) is the latest stable and interoperable version of microformats. Most parsers and tools should support backwards compatibility for prior versions of microformats.


You should publish the microformats that themselves have reasons why to use that resonate with you, e.g.:

IndieWeb Use

The IndieWeb makes heavy use of:

  • h-card to mark up profiles and authors in published posts, then consumed by code (e.g. reply-contexts, readers) for authorship and more.
  • h-entry to markup posts, replies, etc., then consumed by code for displaying, summarizing, replying.
  • h-feed to create feeds of published posts on a blog or feeds of collections of information.
  • in-reply-to to markup links from replies to original posts, then consumed by code for displaying comments, comment threads, etc.
  • XFN for relationships, and identity consolidation (rel=me), consumed by code for IndieAuth etc.

Other formats are in use by IndieWeb community members. See resumé for examples of the h-resume microformat in use.


There is a fuller list of implementations on the microformats wiki. Here are some used by the indieweb community:



Are microformats an API

Q: Are microformats an API?

A: No, microformats are more like the information returned from an API.

HTTP GET of a particular URL of a website can be an API. microformats in the resulting HTML provide the information you might otherwise get from a bespoke API.

Thus combining HTTP, good site URL design, and microformats, your site can be your API. No separate XML/RDF/JSON/??? API endpoints needed. At least for readonly. For a write "API", see micropub.

A: Actually, yes, microformats are the simplest way of providing a read-only API, also known as "your website is your API".

Why not APIs

Main article: API

Q: Why not APIs instead of microformats?

A: See API, in short:

  1. secondary URLs
  2. secondary formats
  3. API key
  4. TOS requirements
  5. Unique snowflakes
  6. Complexity
  7. Fragility

See Also