Microdata (HTML)

For other uses, see Microdata (disambiguation).

Microdata is a WHATWG HTML specification used to nest metadata within existing content on web pages.[1] 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.[2][3] Microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties.[4] 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'.[5][6]

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. For some purposes, an ad-hoc vocabulary is adequate. For others, a vocabulary will need to be designed. Where possible, authors are encouraged to re-use existing vocabularies, as this makes content re-use easier.[1]

Localization

In some cases, search engines covering specific regions may provide locally-specific extensions of microdata. For example, Yandex, a major search engine in Russia, supports microformats such as hCard (company contact information), hRecipe (food recipe), hReview (market reviews) and hProduct (product data) and provides its own format for definition of the terms and encyclopedic articles. This extension was made in order to solve transliteration problems between the Cyrillic and Latin alphabets. Due to the implementation of additional marking parameters of Schema's vocabulary,[7] the indexation of information in Russian-language web-pages became considerably more successful.

Global attributes

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[8][9][10] 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, 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.[11]

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

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 file in a serialization such as RDF/XML, Notation3, or Turtle.

Support

Browser Version Support
Maxthon 3.3.9.600 Yes
Opera (Presto) 12.17 Yes
Opera (Blink) 15 No
Firefox 49 No[15]
Chrome No
Internet Explorer No
Safari No
Microsoft Edge No

See also

  1. 1 2 3 4 5 "Microdata — HTML Draft Standard". Whatwg.org. Retrieved 2016-06-30.
  2. "MicroData - The Future of Search Engine Relevance and Optimization (SEO)". Lyquix.com. Retrieved 2016-06-30.
  3. Schema.org http://schema.org/
  4. ""Distributed," "Extensibility," And Other Fancy Words". Diveintohtml5.info. Retrieved 2016-06-30.
  5. Cotton, Paul (2 Oct 2013). "WG Decision to publish HTML Microdata as a WG Note". public-html-admin@w3.org (Mailing list). Retrieved 2016-06-30.
  6. "HTML Microdata". W3.org. 23 June 2014. Retrieved 2016-06-30.
  7. "Semantic markup deployment in Russia". Academia.edu. Retrieved 2016-06-30.
  8. "Documentation". Schema.org. Retrieved 2016-06-30.
  9. "Type Hierarchy". Schema.org. Retrieved 2016-06-30.
  10. Schema.org Turtle RDFS Schema
  11. 1 2 "Rich snippets (microdata, microformats, RDFa)". Google webmaster central. 2016-05-17. Retrieved 2016-06-30.
  12. "Rich Snippet display clarification". Google.com. 2016-06-22. Retrieved 2016-06-30.
  13. Google Webmasters Channel (2011-12-06). Types of Rich Snippets (Video). Retrieved 2016-06-30.
  14. Opera Software Documentation Team (2011-12-06). "Opera 11.60 for Windows changelog". Opera.com. Retrieved 2016-06-30.
  15. https://bugzilla.mozilla.org/show_bug.cgi?id=909633
  16. "MicrodataJS". Github.com. 2011-12-12. Retrieved 2016-06-30.
This article is issued from Wikipedia - version of the 11/22/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.