1

for the following code:

<nav id="breadcrumbs-as-title" xmlns:v="http://rdf.data-vocabulary.org/#" >
  <ul class="f1 my-levels-2" itemprop="breadcrumb" >
     <li typeof="v:Breadcrumb" ><a href="url1.html" title="title 1" rel="v:url" property="v:title" >title 1</a></li>
     <li typeof="v:Breadcrumb" ><a href="url2.html" title="title 2" rel="v:url" property="v:title" >title 2</a></li>
     <li typeof="v:Breadcrumb" ><strong><span property="v:title" >title 3 (= the title of the current page)</span></strong></li>
  </ul>
</nav>

I see the following error:

@type: Breadcrumb
title: title 3
url: A value for the url field is required.

because my last <li> has no URL.

Should I mark the last <li> as breadcrumb? or remove the mark, as the code in - Breadcrumb microdata help

Should I add 'dummy' item as suggested in How to markup the last non linking item in breadcrumbs list using JSON-LD ?

Community
  • 1
  • 1
Atara
  • 3,523
  • 6
  • 37
  • 56

1 Answers1

2

Your example uses mostly RDFa properties (typeof, property, …), and one Microdata property (itemprop). Unless there is more Microdata not shown in this example, it doesn’t really make sense to mix these two syntaxes like that.

Furthermore, you are using the vocabulary Data-Vocabulary.org, which is no longer maintained. You didn’t state if you have a specific use case in mind, but it’s likely that you want to use the vocabulary Schema.org (it’s the only vocabulary supported by Google, according to their documenation).

In Schema.org, you would use the type BreadcrumbList. You can use Microdata, RDFa, or JSON-LD. See the example at the bottom of the page.

As mentioned in my answer to the question you linked to, Schema.org says that the breadcrumbs are "typically ending with the current page", and Google says for their breadcrumb-related feature that it "may include or omit a breadcrumb for the page on which it appears".

In case you do provide the last item, but you don’t want to link it, you can provide a hidden URL (with the link element in RDFa/Microdata),

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360