HTML and CSS Reference
In-Depth Information
Going back to our restaurant location example, each LocalBusiness item should have a name property that defines
the company name. This poses a potential issue, as we are displaying three locations on the same page. Rather than
adding the company name to each location separately we can add it to the page once and then reference that single
HTML element using the itemref attribute on each LocalBusiness item. This is what it would look like:
<meta id="company-name" itemprop="name" content="Joe's Pizza Co.">
<section id="location1" itemscope
itemtype="http://schema.org/LocalBusiness"
itemref="company-name" >...</section>
<section id="location2" itemscope
itemtype="http://schema.org/LocalBusiness"
itemref="company-name" >...</section>
<section id="location3" itemscope
itemtype="http://schema.org/LocalBusiness"
itemref="company-name" >...</section>
Here you have a single element that defines the item name property. This property is then linked to the three
LocalBusiness items using the elements ID and itemref attributes.
Notice the use of a <meta> element here to define the name property. This element can be used for much more
than just meta keywords, descriptions and charsets. As this element does not display any content to the user it can
come in very handy when you want to add some data to your page that is purely for the benefit of computer pro-
grams. When using a <meta> element to define microdata the value of the item property will be taken from the
content attribute.
Commonly Used Schemas
Many schemas have been developed by the contributors to the schema.org project. The following sections describe
the schemas that you will be using most frequently: LocalBusiness, Event, Person, and Product.
LocalBusiness
Marking up data about a local business and where it is located can be very useful for search engines that display
location-aware results to their users. By using microdata for this application, you give search engines more informa-
tion and therefore increase the chances that they will display this extra information alongside your listing in search
results.
For more information about how Google uses microdata in its search results, check out this page on the webmas-
ter tools website: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=99170 .
You can define a LocalBusiness item using a URL to the schema on schema.org.
Search WWH ::




Custom Search