Search code examples
htmlschema.orgbreadcrumbsmicrodata

Correct Microdata syntax for breadcrumbs NOT in a list?


Trying to determine the correct syntax for using Microdata inside my breadcumbs implementation. Everything I have read seems to lean towards the fact that the breadcrumbs are structured inside an ordered or unorderd list. Mine is not.

<body itemscope="" itemtype="http://schema.org/WebPage"> 
...
  <div class="breadcrumbs" itemprop="breadcrumb">
     <a href="" property="v:url" property="v:title">Home</a> 
     <span class="delimiter"> &gt; </span>
     <a href="">Parent Item</a> 
     <span class="delimiter"> &gt; </span>
     <span>Child</span>
  </div>
...
</body>

If I run it inside Google's tool it seems correct, but compared to their example it is missing a lot of elements and doesn't have the structure of their example BreadcrumbList.

I'm also a little confused about the correct properties for the links. Should they all have title and url properties?

I was looking at the examples at the bottom of the page here: http://schema.org/WebPage


Solution

  • The breadcrumb property expects one of two values:

    If you provide a Text value (like you do in the example), you can’t provide data about each link. If you are fine with that, the Microdata in your example is correct (but it also contains RDFa, which doesn’t seem to make sense, at least not without further context; so if you didn’t add them intentionally, you might want to remove the property attributes).

    If you want to provide data about each link, you have to provide a BreadcrumbList value.

    For the Microdata, it doesn’t matter whether or not you use a list. If the example uses olliaspan, you could as well use something like divspanaspan. You just have to make sure to use the correct element type.

    If you can’t add parent elements to the a elements, it’s still possible to use BreadcrumbList. But then you would have to duplicate the URL with a link element inside the a element.