Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top