Microdata/Schema.org/SEO: How to properly set a ContactPoint

After adding microdata to a page, I usually go to: to test it out and to make sure there's nothing missing.

I am getting the following error:

"ContactPoint must be attached to a parent with a declared type"

I am not sure what I am missing...?

Sample HTML

<div itemscope itemtype="http://schema.org/Person">
    <p>
        <span itemprop="description">Webmaster</span>: 
        <span itemprop="name">Omar</span>
        <br/><a itemprop="url" href="https://plus.google.com/+Omar/">Profile</a>
    </p>

    <p itemscope itemtype="http://schema.org/ContactPoint">
        To contact me please email me at 
            <a itemprop="email" href="mailto:"></a>
            <meta itemprop="contactType" content="Webmaster"/>
            <meta itemprop="sameAs" content="https://plus.google.com/+OmarJuvera"/>
            <meta itemprop="availableLanguage" content="English"/>
            <meta itemprop="availableLanguage" content="Spanish"/>
            <meta itemprop="availableLanguage" content="Japanese"/>
    </p>
</div>
Asked By: Omar
||

Answer #1:

(While Google’s Testing Tool reports this as an error, it’s not an actual error. It should be a warning instead. Your code is valid Microdata and you are correctly using the Schema.org vocabulary.)

  1. You have two top-level items (a Person and a ContactPoint), i.e., they are not related in any way.

  2. If you want to say that the ContactPoint is the contact point for the Person, then you need a property to connect these two items (the HTML-level nesting is not relevant here).

  3. Looking at the defined properties for Person, you can find the contactPoint property, which takes a ContactPoint as value and is defined as:

    A contact point for a person or organization.

    So this property is appropriate for your case.

  4. Add the contactPoint property to the Person item, referencing the ContactPoint item:

    <div itemscope itemtype="http://schema.org/Person"><p itemprop="contactPoint" itemscope itemtype="http://schema.org/ContactPoint"></p>
    </div>
    
Answered By: unor
The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .



# More Articles