Microdata

Microdata is an HTML specification used to nest metadata within existing content on web pages - wikipedia

Search engines, web crawlers, and browsers can extract and process Microdata from a web page and use it to provide a richer browsing experience for users. Search engines benefit greatly from direct access to this structured data because it allows search engines to understand the information on web pages and provide more relevant results to users.

Here you can: * Check microdata usage statistics - trends.builtwith.com * Sites Using Microdata - github

# Example

The following HTML5 markup may be found on a typical “About” page containing information about a person:

<section> Hello, my name is John Doe, I am a graduate research assistant at the University of Dreams. My friends call me Johnny. You can visit my homepage at <a href="http://www.JohnnyD.com">www.JohnnyD.com</a>. I live at 1234 Peach Drive, Warner Robins, Georgia.</section>

Here is the same markup with added Schema.org Microdata:

<section itemscope itemtype="http://schema.org/Person"> Hello, my name is <span itemprop="name">John Doe</span>, I am a <span itemprop="jobTitle">graduate research assistant</span> at the <span itemprop="affiliation">University of Dreams</span>. My friends call me <span itemprop="additionalName">Johnny</span>. You can visit my homepage at <a href="http://www.JohnnyD.com" itemprop="url">www.JohnnyD.com</a>. <section itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"> I live at <span itemprop="streetAddress">1234 Peach Drive</span>, <span itemprop="addressLocality">Warner Robins</span>, <span itemprop="addressRegion">Georgia</span>. </section> </section>

As the above example shows, it is common to use the <section> element, and the <span> element to create the desired markup.

Microdata items can be nested. In this case an item of type http://schema.org/PostalAddress is nested inside an item of type http://schema.org/Person.

The following text shows how Google parses the Microdata from the above example code. Developers can test pages containing Microdata using Google's Rich Snippet Testing Tool.

Item Type: http://schema.org/Person name = John Doe jobTitle = graduate research assistant affiliation = University of Dreams additionalName = Johnny url = http://www.johnnyd.com/ address = Item(1) Item 1 Type: http://schema.org/PostalAddress streetAddress = 1234 Peach Drive addressLocality = Warner Robins addressRegion = Georgia

Microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties. Microdata is an attempt to provide a simpler way of annotating HTML elements with machine-readable tags than the similar approaches of using RDFa and microformats.

The W3C HTML Working Group failed to find an editor for the specification and terminated its development with a 'Note'.

# Global attributes

* __itemscope__ – Creates the Item and indicates that descendants of this element (HTML element) contain information about it. * __itemtype__ – A valid URL of a vocabulary that describes the item and its properties context. * __itemid__ – Indicates a unique identifier of the item. * __itemprop__ – Indicates that its containing tag holds the value of the specified item property. The property's name and value context are described by the item's vocabulary. Properties values usually consist of string values, but can also use URLs using the a element and its href attribute, the img element and its src attribute, or other elements that link to or embed external resources. * __itemref__ – Properties that are not descendants of the element with the _itemscope_ attribute can be associated with the item using this attribute. Provides a list of element ids (not _itemid_s) with additional properties elsewhere in the document.

# Vocabularies

Microdata vocabularies provide the semantics, or meaning of an Item. Web developers can design a custom vocabulary or use vocabularies available on the web.

A collection of commonly used markup vocabularies are provided by Schema.org schemas which include: * Person * Place * Event * Organization * Product * Review * Review-aggregate * Breadcrumb * Offer * Offer-aggregate

Major search engine operators like Google, Microsoft and Yahoo! rely on this markup to improve search results.

The same machine-readable terms can be used not only in HTML Microdata, but also in other annotations such as RDFa or JSON-LD in the markup, or in an external RDF (Resource Description Framework) file in a serialization such as RDF/XML, Notation3, or Turtle (Turtle (syntax)).

# See also