0

My data is set out like this

<h6 itemprop="name">London</h6><br>
<ul class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<li itemprop="streetAddress">88 my streetname</li>
<li>City Center</li>
<li itemprop="addressLocality">London</li>
<li itemprop="postalCode">W5 4RX</li>
</ul>

The problem I have is street address is split over 2 lines - will duplicating the the streetAddress property have a detrimental effect?

<li itemprop="streetAddress">88 my streetname</li>
<li itemprop="streetAddress">City Center</li>
unor
  • 92,415
  • 26
  • 211
  • 360
LeBlaireau
  • 17,133
  • 33
  • 112
  • 192
  • Duplicating `addressLocality` would make sense, but `streetAddress` is described in the schema as House/building number (or name) and road name. For London you would not use a 'city cent**re**' line because it is not part of the address (center is also spelt differently) . London is divided into boroughs which aren't normally in the postal address. For most of the rest of the country there would be a **town name** and **county** (so 2 lines would be needed/preferred). – Mousey Jul 20 '15 at 05:16

1 Answers1

2

Duplicating the streetAddress property is technically allowed - schema.org properties can be used multiple times - but some parsers may have problems understanding your data.

In the first example at the bottom of http://schema.org/PostalAddress the streetAddress consists of 2 lines of text including both the street number & name and the district of the city. This approach should probably be considered best practice as it's in the official schema.org documentation.

Personally I don't think that an unordered list is the best HTML element to use. A simple paragraph with some spans should do the job:

<h6 itemprop="name">London</h6><br>
<p class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"><br>
  <span itemprop="streetAddress">88 my streetname<br>
  City Center</span>
  <span itemprop="addressLocality">London</span><br>
  <span itemprop="postalCode">W5 4RX</span>
</p>

If you must use an unordered list, then inserting an extra div may solve your problem:

<h6 itemprop="name">London</h6><br>
 <ul class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
   <div itemprop="streetAddress">
     <li>88 my streetname</li>
     <li>City Center</li>
   </div>
   <li itemprop="addressLocality">London</li>
   <li itemprop="postalCode">W5 4RX</li>
 </ul>
Paul Watson
  • 361
  • 1
  • 3
  • 8