In Part II of this series, we go into how you can apply the schema.org markup in your websites. The articles helps you identify the business types, provides navigation tips and provides examples of markup for Locations, Offers, and ImageGallery.
Identifying your business type
Schema.org has a list of eight common Home and Construction Business specialities:
- Electrician
- GeneralContractor
- HVACBusiness
- HousePainter
- Locksmith
- MovingCompany
- Plumber
- RoofingContractor
You can browse the tree of types here: http://schema.org/docs/full.html. To find the Home And Construction types, follow the tree along this path:
What if my business type isn’t listed?
The Property additionalType allows for us to add a type that aren’t included in the schema. The Product Ontology references Wikipedia through Dbpedia and we have another post explaining how to use additionalType in more detail.
<link itemprop="additionalType" href="http://www.productontology.org/id/Maid" />
- http://www.productontology.org/id/Architect
- http://www.productontology.org/id/Landscape_architect
- http://www.productontology.org/id/Flooring
- http://www.productontology.org/id/Gardening
- http://www.productontology.org/id/Maid
- http://www.productontology.org/id/Handyman (consider also GeneralContractor)
- http://www.productontology.org/id/Energy_audit
- http://www.productontology.org/id/Interior_design
- http://www.productontology.org/id/Masonry
- http://www.productontology.org/id/Environmental_remediation
If you still don’t see your business type, first identify your speciality in Wikipedia. Then take the last part of the url, e.g. if I search for Masonry in wikipedia and I get the page http://en.wikipedia.org/wiki/Masonry then I want to take “Masonry” and append it to http://www.productontology.org/id/ to get http://www.productontology.org/id/Masonry for your speciality. To confirm, enter the new URL in your browser and If the new URL displays a result in the product ontology (without saying deprecated or giving an error), then you’ve got it.
Company information
The Schema.org hierarchy is generic at the top (Thing) and as you go down the tree you to more specialized (Plumber) types. The hierarchy leading to Plumber means that the Plumber type inherits the properties of the more generic types, e.g. HomeAndConstructionBusiness, LocalBusiness, Organization and Thing.
As you view the Plumber specification, the Properties are first grouped by the more generic things it inherits from. First, you see properties all Things have:
The Organization properties is shown in the third group of properties below that of Place (a key part of the LocalBusiness class). For Organization you could associate employee, foundingDate or contactPoint.
You will next see Properties inherited from Place, which is because a LocalBusiness is defined by its Place property group.
The last section of properties is properties shared by LocalBusiness
Locations
The primary business location is an especially important piece of information for you to include. In the schema.org vocabulary, a schema.org/Place concept is where you add your location information. At a minimum your Locations should include a PostalAddress and a Telephone number.
We recommend you include the business location on your main page and on a contact page.
If your website has location information like:
Carters Contracting
1901 Lemur Ave
Sunnyvale, CA 94086
(408) 714-1489
It would be marked up like this:
<div itemscope itemtype="http://schema.org/GeneralContractor">
<span itemprop="name">Carters Contracting</span>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">1901 Lemur Ave</span>
<span itemprop="addressLocality">Sunnyvale</span>,
<span itemprop="addressRegion">CA</span>
<span itemprop="postalCode">94086</span>
</div>
<span itemprop="telephone">(408) 714-1489</span>
</div>
What if we have multiple locations?
Include multiple postal addresses. We suggest you create one page with a list of your multiple locations, each item in the list having its own PostalAddress. Then create a separate page for each location which has specific information on it, plus a Google map, and location specific information.
Offers ( Products / Services )
An Organization may include their products and services using the makesOffer relationship. This is a relationship between an Organization or Person and their Offer.
An offer should use additionalType relationship to declare the specific type of offer. The additionalType was created with the Product Ontology in mind. This product ontology provides more than 300,000 precise definitions. See how to use additionalType for more information.
The offer at a minimum should declare a name, description and a price. If you have reviews for the offer, then including this may generate rich snippets by the search engines.
Picture Galleries
A common way for businesses in the industry to showcase their work are picture galleries. Fortunately, the schema.org includes the ImageGallery to help publishers declare them to the search engine crawlers.
The ImageGallery, being a subclass of CreativeWork and Webpage, comes with many fields. The key here is to use http://schema.org/associatedMedia to relate the ImageGallery to a MediaObject (the individual image).
HTML for an image gallery
<div>
<ul>
<li><img src="http://www.getprosonline.com/wp-content/uploads/2014/01/Plumbing-Repair.jpg" /></li>
<li><img src="http://www.getprosonline.com/wp-content/uploads/2014/01/plumbing_pipes.jpg" /></li>
<li><img src="http://www.getprosonline.com/wp-content/uploads/2014/01/home-plumbing-system.gif" /></li>
<li><img src="http://www.getprosonline.com/wp-content/uploads/2014/01/basement_bathroom_plumbing.jpg" /></li>
<li><img src="http://www.getprosonline.com/wp-content/uploads/2014/01/home-plumbing-diagrams-300x183.jpg" /></li>
</ul>
</div>
Image gallery with Schema.org Markup
This is the minimum you need to declare the Image Gallery. You may want to add in properties like the ImageGallery description and images’ name. Below you will see how you can relate the concepts.
<div itemscope itemtype="http://schema.org/ImageGallery">
<ul>
<li itemprop="associatedMedia"itemscope itemtype="MediaObject"><img itemprop="http://schema.org/image" src="http://www.getprosonline.com/wp-content/uploads/2014/01/Plumbing-Repair.jpg" /></li>
<li itemprop="associatedMedia" itemscope itemtype="MediaObject"><img itemprop="http://schema.org/image" src="http://www.getprosonline.com/wp-content/uploads/2014/01/plumbing_pipes.jpg" /></li>
<li itemprop="associatedMedia" itemscope itemtype="MediaObject"><img itemprop="http://schema.org/image" src="http://www.getprosonline.com/wp-content/uploads/2014/01/home-plumbing-system.gif" /></li>
<li itemprop="associatedMedia" itemscope itemtype="MediaObject"><img itemprop="http://schema.org/image" src="http://www.getprosonline.com/wp-content/uploads/2014/01/basement_bathroom_plumbing.jpg" /></li>
<li itemprop="associatedMedia" itemscope itemtype="MediaObject"><img itemprop="http://schema.org/image" src="http://www.getprosonline.com/wp-content/uploads/2014/01/home-plumbing-diagrams-300x183.jpg" /></li>
</ul>
</div>
Rich Snippets Test
Here is what Google sees when crawling:
Reviews
Reviews are flexible in that they can be about many topics. At a high level, they can be about any CreativeWork, Organization, Place, Offer or Product. They can also be about any of the subtypes of those, such as ImageObject, Locksmith, Residence, a Hammer for $20, or Hammer as a product, Oddly enough, a review can even be about a review.
What is recommended here is that you feature the reviews your customers have given you so that you get enough for a search engine’s rich snippets. For instance, you could feature one particular review:
Or the aggregate reviews to show an average rating:
The example reviews given at http://schema.org/Review are sufficient to show you how to product these snippets.
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<spanitemprop="reviewRating">5</span> stars -
<b>"<spanitemprop="name">A masterpiece of literature</span>" </b>
by <spanitemprop="author">John Doe</span>,
Written on <metaitemprop="datePublished"content="2006-05-04">May 4, 2006
<spanitemprop="reviewBody">I really enjoyed this book. It captures the essential challenge people face as they try make sense of their lives and grow to adulthood.</span>
</div>
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<spanitemprop="reviewRating">4</span> stars -
<b>"<spanitemprop="name">A good read.</span>" </b>
by <spanitemprop="author">Bob Smith</span>,
Written on <metaitemprop="datePublished"content="2006-06-15">June 15, 2006
<spanitemprop="reviewBody">Catcher in the Rye is a fun book. It's a good book to read.</span>
</div>
Check back soon for the other releases in the Schema.org series:
- Part I – Understanding Schema.org
- Part II – Applying Schema.org, Construction Example
- Part III – Schema.org Tools
- Part IV – Semantic Search Marketing at the SemTech 2013 conference