About microdata
The HTML5 microdata specification is a way to label content to describe a specific type of information—for example, reviews, person information, or events. Each information type describes a specific type of item, such as a person, and event, or a review. For example, an event has the properties venue, starting time, name, and category.
Microdata uses simple attributes in HTML tags (often <span>
or <div>
) to assign brief and descriptive names to items and properties. Here's an example of a short HTML block showing basic contact information for Bob Smith.<div> My name is Bob Smith but people call me Smithy. Here is my home page: <a href="http://www.example.com">www.example.com</a> I live in Albuquerque, NM and work as an engineer at ACME Corp. </div>
<div itemscope itemtype="http://data-vocabulary.org/Person"> My name is <span itemprop="name">Bob Smith</span> but people call me <span itemprop="nickname">Smithy</span>. Here is my home page: <a href="http://www.example.com" itemprop="url">www.example.com</a> I live in Albuquerque, NM and work as an <span itemprop="title">engineer</span> at <span itemprop="affiliation">ACME Corp</span>. </div>
- In the first line,
itemscope
indicates that the content in the<div>
is an item.itemtype="http://data-vocabulary.org/Person
indicates that the item is a Person. - Each property of the Person item is identified with the
itemprop
attribute. For example,itemprop="name"
describes the person's name.
Nested entities
The example above shows contact information about Bob Smith, but it doesn't include his address. The example below shows the same HTML, but in this case, it includes theaddress
property.<div itemscope itemtype="http://data-vocabulary.org/Person"> My name is <span itemprop="name">Bob Smith</span>, but people call me <span itemprop="nickname">Smithy</span>. Here is my homepage: <a href="http://www.example.com" itemprop="url">www.example.com</a>. I live in <span itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address"> <span itemprop="locality">Albuquerque</span>, <span itemprop="region">NM</span> </span> and work as an <span itemprop="title">engineer</span> at <span itemprop="affiliation">ACME Corp</span>. </div>
- The
address
property is itself an item, containing its own set of properties. This is indicated by putting theitemscope
attribute on the item that declares theaddress
property, and using theitemtype
attribute to specify the type of item being described, like this:<span itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address">.
Date and time information
To specify dates and times unambiguously, use thetime
element with the datetime
attribute. Here, thestartDate
property indicates the start date of an event. The value in the datetime
attribute is specified using the ISO date format. Using this format lets you provide search engines with detailed date, time and—optionally—time zone in ISO format ("2009-10-15T19:00-08:00
"), while still displaying the date on your page in a user-friendly way ("15 October 2009, 7PM").<time itemprop="startDate" datetime="2009-10-15T19:00-08:00">15 October 2009, 7PM</time>
Source:-http://support.google.com/webmasters/bin/answer.py?hl=en&answer=176035
Great blog build by you. I read your blog, its very informative and useful. You have done a great job. I have some information about Gbp Athens
ReplyDelete