Microdata (HTML): Difference between revisions

Content deleted Content added
Spelling/mis-typing of names & places.
m clean up, removed stub tag using AWB
Line 1:
'''Microdata''' is a [[WHATWG]] [[HTML5]] specification used to nest [[semantics]] within existing content on web pages.<ref name="WHATWG"/> [[Search engines]], [[web crawlers]], and [[Web_browserWeb browser|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.<ref name="DIVE"/> Microdata helps technologies such as search engines and web crawlers better understand what information is contained in a web page, providing better [[Search_engine_results_pageSearch engine results page|search results]]. Microdata is an attempt to provide a simpler way of annotating [[HTML_element|HTML elementselement]]s with machine readable tags than the similar approaches of using [[RDFa]] and [[Microformats]].
 
== Microdata Vocabularies ==
Line 5:
 
== Microdata Global Attributes ==
* <code>Itemscope</code> – Creates the Item and indicates that descendants of this [[HTML_elementHTML element|element]] contain information about it.<ref name="WHATWG"/> This attribute precedes the <code>itemtype</code> attribute in the HTML element’s tag.
* <code>Itemtype</code> – A valid URL of a vocabulary that describes the item and its properties context.
* <code>ItemId</code> – Indicates a unique identifier of the item in the vocabulary.
* <code>Itemprop</code> – 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 [[URL|URL's]] using the a element and its <code>href</code> attribute, the <code>img</code> element and its <code>src</code> attribute, or other elements that link to or embed external resources.<ref name=WHATWG/>
* <code>Itemref</code> - Properties that are not descendants of the element with the <code>itemscope<code> attribute can be associated with the item using this attribute. Provides a list of elements to web crawlers to find additional property values of the item elsewhere in the document.<ref name="WHATWG"/>
 
Line 45:
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 a 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 if pages containing Microdata using ''Googles Rich Snippet Testing Tool''.<ref name="GoogleRS"/>.
 
The following text shows how Google parses the Microdata from the above example code. Developers can test if pages containing Microdata using ''Googles Rich Snippet Testing Tool''<ref name="GoogleRS"/>.
 
Item
Line 60 ⟶ 59:
street-address = 1234 Peach Drive
locality = Warner Robins
region = Georgia
 
== Support ==
[[Google]] can use microdata in its [[Search engine results page|result pages]].<ref name=GoogleRS />
 
Currently, no browser supports the Microdata [[Document_Object_ModelDocument Object Model|DOM]] [[API]].
 
== See also ==
Line 90 ⟶ 89:
[[Category:Semantic Web]]
[[Category:HTML]]
 
{{web-stub}}