Skip to content

Instantly share code, notes, and snippets.

@capjamesg
Created January 12, 2022 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capjamesg/05645a02c43e26b542695eb9d94e8e5c to your computer and use it in GitHub Desktop.
Save capjamesg/05645a02c43e26b542695eb9d94e8e5c to your computer and use it in GitHub Desktop.

Microformats Wiki Page

Microformats are a set of defined HTML classes created to serve as consistent and descriptive metadata about an element, designating it as representing a certain type of data (such as contact information, geographic coordinates, events, blog posts, products, recipes, etc.).[1] They allow software to process the information reliably by having set classes refer to a specific type of data rather than being arbitrary. Microformats emerged around 2005 and were predominantly designed for use by search engines, web syndication and aggregators such as RSS.[2]

Although the content of web pages has been capable of some "automated processing" since the inception of the web, such processing is difficult because the markup elements used to display information on the web do not describe what the information means.[3] Microformats can bridge this gap by attaching rich semantics directly to HTML elements, and thereby obviating other, more complicated, methods of automated processing, such as natural language processing, more efficient search indexing, or screen scraping. The use, adoption and processing of microformats enables data items to be indexed, searched for, saved or cross-referenced, so that information can be reused or combined.[3]

Microformats are extensively used in the [[IndieWeb]] community and incubated standards such as Webmention and Micropub standards to enable interoperable communication between social web services. These standards allow for posting comments and reactions on a website and posting new content to a website, respectively. A 2018 IndieMap crawl found over 1,100 sites publishing a h-card, used to mark up online content cards, and over 1,000 sites using h-entry, a way to mark up articles and posts.

Background

Microformats emerged around 2005[note 1] as part of a grassroots movement to make recognizable data items (such as events, contact details or geographical locations) capable of automated processing by software, as well as directly readable by end-users.[3][note 2] Link-based microformats emerged first. These include vote links that express opinions of the linked page, which search engines can tally into instant polls.[4]

CommerceNet, a nonprofit organization that promotes e-commerce on the Internet, has helped sponsor and promote the technology and support the microformats community in various ways.[4] CommerceNet also helped co-found the Microformats.org community site.[4]

Neither CommerceNet nor Microformats.org operates as a standards body. The microformats community functions through an open wiki, a mailing list, and an Internet relay chat (IRC) channel that is bridged with Slack, Matrix and Discord.[4] Most of the existing microformats originated at the Microformats.org wiki and the associated mailing list[citation needed] by a process of gathering examples of web-publishing behaviour, then codifying it. Some other microformats (such as rel=nofollow and unAPI) have been proposed, or developed, elsewhere.

Today, many developers have implemented standards that use microformats as a standard way of communicating data. Implementations of the Webmention standard, used by hundreds of websites as a method of sharing comments, likes, and other social interactions, often rely on microformats to derive information from a post or article. This may include the author of a post, a particular reaction indicated on a post, and metadata about a page.

XHTML and HTML standards allow for the embedding and encoding of semantics within the attributes of markup elements. Microformats take advantage of these standards by indicating the presence of metadata using the following attributes:

  • class

    Classname

  • rel

    relationship, description of the target address in an anchor-element (<a href=... rel=...>...</a>)

  • rev

    reverse relationship, description of the referenced document (in one case, otherwise deprecated in microformats[5])

Using this approach, microformats are kept alongside as the actual data they represent. Thus, there is no need to declare a separate format file to indicate a structured version of a page, as one needs to do when using a format like Atom or RSS. The structured microformats share the same HTML as the information they represent unlike [[Schema]] standards where data is dedicated script tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment