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 to schema.org and would like to know if I can simply do something like the following to handle the markup:
<p itemprop="address">Some city, WY</p>
As I said, I'm new to all this, but I guess I'm using the "Microdata" format.
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:
I wouldn't recommend that you use the PostalAddress type because technically the postal address should be the full mailing address.
David
Yes, you may use text as value for
address
. While its expected value is another item (namelyPostalAddress
) instead of text, Schema.org does not require this (bold emphasis mine):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:(Terminology: You are using the syntax, or format, Microdata and the vocabulary Schema.org.)