microformats

From IndieWeb
(Redirected from Microformats)


microformats are extensions to HTML for marking up notes, 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.


Why

Adding microformats classes to your existing HTML is a quick and easy way to allow tools like feed readers to use structured data from your site, without having to publish fragile sidefiles.

For vocabulary-specific reasons and use cases, see the following:

How

Guides and examples on how to publish microformats:

Resources for consuming microformats:

IndieWeb Use

The IndieWeb makes heavy use of:

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

Implementations

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

FAQ

api.png

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