Microdata (HTML)

Microdata (HTML)
HTML
This box: view · talk · edit

Microdata is a WHATWG HTML specification used to nest semantics 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. Microdata use a supporting vocabulary to describe an item and name-value pairs to assign values to its properties.[2] Microdata helps technologies such as search engines and web crawlers better understand what information is contained in a web page, providing better search results. 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.

Contents

Microdata 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 (and Google Supported[3]) Microdata vocabularies located at http://data-vocabulary.org which include: Person, Event, Organization, Product, Review, Review-aggregate, Breadcrumb, Offer, Offer-aggregate. Other markup vocabularies are provided by Schema.org schemas. Major search engines 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]

Microdata Global Attributes

  • itemscope – Creates the Item and indicates that descendants of this element contain information about it.[1]
  • 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 properties name and value context are described by the items 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.[1]
  • 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 id's of elements with additional properties elsewhere in the document.[1]

Example

The following 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 Microdata:

<section itemscope itemtype="http://data-vocabulary.org/Person"> 
        Hello, my name is 
        <span itemprop="name">John Doe</span>, 
        I am a 
        <span itemprop="title">graduate research assistant</span> 
        at the 
        <span itemprop="affiliation">University of Dreams</span>. 
        My friends call me 
        <span itemprop="nickname">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://data-vocabulary.org/Address">
                I live at 
                <span itemprop="street-address">1234 Peach Drive</span> 
                <span itemprop="locality">Warner Robins</span>
                , 
                <span itemprop="region">Georgia</span>.
        </section>
</section>

As the above example shows, Microdata items can be nested. In this case an item of type http://data-vocabulary.org/Address is nested inside an item of type http://data-vocabulary.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.[3]

Item
   Type: http://data-vocabulary.org/Person
   name = John Doe
   title = graduate research assistant
   affiliation = University of Dreams
   nickname = Johnny
   url = http://www.johnnyd.com/
   address = Item(1)
Item 1
   Type: http://data-vocabulary.org/Address
   street-address = 1234 Peach Drive
   locality = Warner Robins
   region = Georgia

Support

Google can[clarification needed] use microdata in its result pages.[3]

Currently, no stable release of a browser supports the Microdata DOM API, but the upcoming Opera 12 does.[4]

MicrodataJS[5] is a JavaScript library and jQuery plugin that emulates the DOM API.

See also

Earlier related work

References

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Microdata — can mean: Microdata (HTML) a proposal for semantic markup in HTML Microdata Corporation California based computer company This disambiguation page lists articles associated with the same title. If an interna …   Wikipedia

  • Microdata — Microdata: Microdata Corporation (англ.)  американская компьютерная компания, в 1983 году вошла в состав McDonnell Douglas Corporation. Микроданные  способ семантически размечать сведения о разнообразных сущностях на веб страницах …   Википедия

  • Microdata (statistics) — For other uses, see Microdata (disambiguation). In the study of survey and census data, microdata is information at the level of individual respondents.[1] For instance, a national census might collect age, home address, educational level,… …   Wikipedia

  • Comparison of layout engines (HTML5) — HTML HTML and HTML5 Dynamic HTML XHTML XHTML Mobile Profile and C HTML Canvas element Character encodings Document Object Model Font family HTML editor HTML element HTML Frames HTML5 video HTML scrip …   Wikipedia

  • HTML5 — Logo des W3C HTML5[1] ist eine textbasierte Auszeichnungssprache zur Strukturierung und semantischen Auszeichnung von Inhalten wie Texten, Bildern und Hyperlinks in Dokumenten. Sie soll die Nachfolge von HTML4 antreten. Die Sprache befindet sich… …   Deutsch Wikipedia

  • Asian American — Asian American …   Wikipedia

  • Yerida — (hebrewterm|ירידה|yerida|descent) is the somewhat derogatory [cite book| last = Ben Moshe| first = Danny|authorlink =Danny Ben Moshe|coauthors = Zohar Segev|title = Israel, the Diaspora and Jewish Identity|publisher = Sussex Academic Press|date …   Wikipedia

  • Census — taker visits a family living in a caravan, Netherlands 1925 A census is the procedure of systematically acquiring and recording information about the members of a given population. It is a regularly occurring and official count of a particular… …   Wikipedia

  • Microcode — is a layer of hardware level instructions and/or data structures involved in the implementation of higher level machine code instructions in many computers and other processors; it resides in special high speed memory and translates machine… …   Wikipedia

  • English programming language — Infobox programming language name = ENGLISH paradigm = ? year = 1973 designer = developer = Microdata Corporation latest release version = latest release date = latest test version = latest test date = typing = ? implementations = dialects =… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”