View Full Version : Adding SCHEMA data to header correctly

Feb 25th, 2012, 05:54 AM
I've got this figured out about half way. I'm trying to accomplish both adding a 1+ button to my site and adding organizational microdata for company name, address, phone number, etc

I have all the item types & item properties set correctly in the html body for organizational data. I also have the appropriate item properties in the head tag for the 1+ button snippets.

The confusing part is how to set the html tag above the head tag in my page. The Google 1+ setup page says:

<!-- Update your html tag to include the itemscope and itemtype attributes -->
<html itemscope itemtype="http://schema.org/LodgingBusiness">

But in the Google forum a Contributor was saying you don't actually add the itemscope or itemtype in the html tag, but rather in the div element in the page (which I do have setup correctly). She states to add the schema.org namespace:


...in the html tag. Right now my html tag is displayed as:

<html xmlns="http://www.w3.org/1999/xhtml">

Do I extend the html tag to read as:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:schema="http://schema.org/">


Also, if my schema type if for a "LodgingBusiness", I have this itemscope itemtype set to such in the body div element. Do I also need to make it set as this in the html tag?