What Are Micro-formats?

Written by Caitlin Davidson


Micro-formats Defined

Micro-formats are standards used to embed structured data and semantics in HTML and provide an API to be used by search engines.

Micro-formats are used to mark entities, ranging from fundamental to domain specific information. These include; people, events, locations, and organizations. 

Micro-formats are supported by all major search engines. Search engines benefit  from direct access to this structured data, as it allows them to understand the information on web pages and generate more relevant search results to users. 

To create a micro-formats object, h-* class names are used in the class attribute. To add a property to an object, the p-*, u-*, dt-*, e-* class names are used on one of the object’s descendants.

  • “h-*” for root class names. These top-level root classes usually indicate a type and corresponding expected vocabulary of properties.
    • h-card describes a person or organization
    • h-entry describes episodic or date stamped online content 
    • h-feed describes a stream or feed of posts
  • “p-*” for plain (text) properties.
    • Generic plain text parsing, element text in general. 
  • “u-*” for URL properties.
  • “dt-*” for date/time properties.
    • Special parsing: time element date/time attribute, value-class-pattern and separate date time value parsing for readability.
  • “e-*” for element tree properties where the entire contained element hierarchy is the value. The “e-” prefix can also be remembered as “element tree”, “embedded markup”, or “encapsulated markup”.

In Data Defined, we help make the complex world of data more accessible by explaining some of the most complex aspects of the field.

Click Here for more Data Defined.