Re: setting multiple properties: name and location in a href?

Hi Michael,

On Thu, May 31, 2012 at 10:21 AM, Michael Below <below@judiz.de> wrote:

> I just noticed another difference between Google and Bing and I am
> wondering how to do it right:
>
> I have a list of old blog entries on an "archive" page of my blog. I
> described that page in microdata as a Blog, and I am trying to integrate
> the microdata for the individual entries like this:
>
> <li itemscope itemtype="http://schema.org/BlogPosting"><a
> itemprop="contentLocation name headline"
> href="/aktuelles/atomhaftung/">Haftung für Atomunfälle: Wer soll das
> bezahlen?</a>
> <p class="blogdate">Geschrieben am <time itemprop="dateCreated"
> datetime="2011-03-30 14:41" pubdate>30.03.2011</time></p></li>
>
> According to Google, I have set all properties to a text value and to a
> href value both (which seems fine). According to Bing, I have set it all
> to the href values.
>

Bing is right and the microdata spec is clear on this: an itemprop
attribute in an 'a' element will target the href, and the href only. so all
three properties that you are using have the href "/aktuelles/atomhaftung/"
as value. To markup the text of a link, you need to add an extra span
element inside that link to explicitly markup the text, like this:

<li itemscope itemtype="http://schema.org/BlogPosting">
  <a itemprop="contentLocation name
headline" href="/aktuelles/atomhaftung/">
    <span itemprop="headline">Haftung für Atomunfälle: Wer soll
das bezahlen?</span>
  </a>
  <p class="blogdate">Geschrieben am <time itemprop="dateCreated"
datetime="2011-03-30 14:41" pubdate>30.03.2011</time>
  </p>
</li>

properties in @itemprop should only apply to the href, the other should go
in the @itemprop of the inner span.

The extracted rich snippet data that Google shows is misleading here, it
extracts more data than it should.

Steph.

Received on Thursday, 31 May 2012 15:02:49 UTC