Skip to content Skip to sidebar Skip to footer

Can You Use Plain Text For Addresses In Schema.org Markup?

I have a CMS that has a single text field for an Organization address. The data is stored very inconsistently and, in many cases, I'm dealing with city/state only. I'm fairly new t

Solution 1:

Yes, you may use text as value for address. While its expected value is another item (namely PostalAddress) instead of text, Schema.org does not require this (bold emphasis mine):

While we would like all the markup we get to follow the schema, in practice, we expect a lot of data that does not. We expect schema.org properties to be used with new types. We also expect that often, where we expect a property value of type Person, Place, Organization or some other subClassOf Thing, we will get a text string. In the spirit of "some data is better than none", we will accept this markup and do the best we can.

However, it’s questionable if it’s really the "physical address" of an Organization if you only specify city and state.

If you would use a PostalAddress item as value, you could specify exactly what the address parts are that you provide, so consumers have a better chance to understand your data:

<pitemprop="address"itemscopeitemtype="http://schema.org/PostalAddress"><spanitemprop="addressLocality">Some city</span>, 
  <spanitemprop="addressRegion">WY</span></p>

(Terminology: You are using the syntax, or format, Microdata and the vocabulary Schema.org.)

Solution 2:

I'm afraid that wouldn't really work, as the expected value for the "address" property is the PostalAddress type. But you can simply do something like this as one possible option:

<spanitemprop="location"itemscopeitemtype="http://schema.org/City"><spanitemprop="name">City Name</span>, State
</span>

I wouldn't recommend that you use the PostalAddress type because technically the postal address should be the full mailing address.

David

Post a Comment for "Can You Use Plain Text For Addresses In Schema.org Markup?"