1

Any idea how to markup a floor number with schema.org microdata for a local business' postal address?

<div itemscope itemtype="http://schema.org/LocalBusiness">
    <span itemprop="legalName">Company Limited</span>
    <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <div itemprop="streetAddress">Billy Street 100</div>
        <div>10th Floor</div>
        <div><span itemprop="addressLocality">Paris</span>, 
                <span itemprop="addressRegion">TX</span> 
                <span itemprop="postalCode">75462</span></div>
        <div itemprop="addressCountry">United States</div>
    </div>
</div>

Also, is the above markup semantic?

If there's no floor number, should I use RDFa?

Baumr
  • 6,124
  • 14
  • 37
  • 63

1 Answers1

1

Unfortunately, schema.org doesn't have a property for secondary address line, which is where the floor number would go. postOfficeBoxNumber is as close as it gets, but it looks like it's reserved specifically for PO Box numbers, not the whole line that contains PO Box.

Perhaps you could put floor number in streetAddress, on a new line using a <br> tag.

Although I know a lot about street addresses (I work at SmartyStreets), I'm not a microdata expert: but from what I can tell, yes, the markup looks okay to me.

And you could use RDFa instead if you'd like: Google supports it for its rich snippets. Or you could have some fun and extend schema.org for your needs.

Matt
  • 22,721
  • 17
  • 71
  • 112
  • Using RDFa sounds like a better idea, thank you! So when it comes to showing rich snippets in search results, does Google support RDFa 100% as much as it does it's preferred/endorsed microdata? – Baumr Jan 13 '13 at 19:48
  • I assume so, based on Google's docs. Alternatively, since a floor number is *kind of like* a PO box (for your purposes), you might get away with putting it in the PO box slot anyway if you wanted to keep using schema.org microdata. – Matt Jan 14 '13 at 14:49
  • Use schema prefix from RDFa Initial Context http://www.w3.org/2011/rdfa-context/rdfa-1.1 and as @Matt said have fun extending schema. Google leads in supporting RDFa vocabs, microformats, while HTML5 microdata behavior will be guaranteed as given by http://www.w3.org/QA/2012/09/getting_html5_to_recommendatio.html – Chawathe Vipul S Jan 26 '13 at 19:47