1
votes

I am adding Schema to a contact page I am building. The page has both a physcial address which is an office, however, the mailing address is not the same. Here is what I have done using Schema:

<div itemscope itemtype="http://schema.org/LocalBusiness">   
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
 <ul>
  <li>Office: <span itemprop="streetAddress">1234 Anywhere Street</span>
   <br/> <span itemprop="addressLocality">Denver</span>, <span itemprop="addressRegion">CO</span> <span itemprop="postalCode">80000</span>
  </li>
 </ul>            
</div>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
 <ul>
  <li>Mailing: Post Office Box <span itemprop="postOfficeBoxNumber">5555</span>
  <br/> <span itemprop="addressLocality">Denver</span>, <span itemprop="addressRegion">CO</span> <span itemprop="postalCode">80000</span>
  </li>
 </ul>
</div> 
<div>
 <ul>
  <li>Phone: <span itemprop="telephone">555-555-5555</span></li>
  <li>Fax:  <span itemprop="faxNumber">555-555-5555</span></li>
 </ul>
</div>      
</div>    

My questions:

  • Is it technically correct to have two instances of <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">?
  • If not how do I leave the second <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">?

What is the correct way?

1

1 Answers

2
votes

It's technically correct from syntax point of view. But unfortunately one has no chance to understand what is what from such a markup. I'd rather use some more descriptive properties. Such as location for physical address and contactPoint for mailing address. So it should look like this

<div itemscope itemtype="http://schema.org/LocalBusiness">   
  <div itemprop="location" itemscope itemtype="http://schema.org/PostalAddress">
   <ul>
    <li>Office: <span itemprop="streetAddress">1234 Anywhere Street</span>
     <br/> <span itemprop="addressLocality">Denver</span>, <span itemprop="addressRegion">CO</span> <span itemprop="postalCode">80000</span>
    </li>
   </ul>            
  </div>
  <div itemprop="contactPoint" itemscope itemtype="http://schema.org/PostalAddress">
   <ul>
    <li><span itemprop="contactType">Mailing: Post Office Box</span> <span itemprop="postOfficeBoxNumber">5555</span>
    <br/> <span itemprop="addressLocality">Denver</span>, <span itemprop="addressRegion">CO</span> <span itemprop="postalCode">80000</span>
    </li>
   </ul>
  </div> 
  <div>
   <ul>
    <li>Phone: <span itemprop="telephone">555-555-5555</span></li>
    <li>Fax:  <span itemprop="faxNumber">555-555-5555</span></li>
   </ul>
  </div>      
</div>   

Note that I've added itemprop="contactType" to specify explicitly type of contact point. It is simple text though (type of property) so you can use any description you like.

Another small remark that we can use schema.org/PostalAddress for contactPoint since it is child of http://schema.org/ContactPoint type.