When you use an ul
element to format your breadcrumb (aiming for better Google search results), how do you define the RDFa markup? The reason I am asking is that the li
elements are siblings from each other, and not children. I am doing something like:
<div class="dv_breadcrumbs">
<ul xmlns:v="http://rdf.data-vocabulary.org/#">
<li typeof="v:Breadcrumb"><a title="Level1" href="/level1" rel="v:url"><span property="v:title">Level1</span></a></li>
<li typeof="v:Breadcrumb"><a title="Level2" href="/level2" rel="v:url"><span property="v:title">Level2</span></a></li>
<li typeof="v:Breadcrumb"><a title="Level3" href="/level3" rel="v:url"><span property="v:title">Level3</span></a></li>
<li typeof="v:Breadcrumb"><a title="lever4" href="/level4" rel="v:url"><span property="v:title">Level4</span></a></li>
<li typeof="v:Breadcrumb"><a class="currentLevel" title="Current Level" rel="v:url" property="v:title">Current Level</a></li>
</ul>
</div>
Is it correct? Would the search engines understand that the breadcrumb items are in sequence inside the ul
element?
Yes. You can check it using Google Testing Tool. Your code will result in following:
Although some clarifications needed.
(sorry for citation - for some reason SO doesn't allow me to put visible code here).
And you'll get smth like:
So it is better to rewrite your code like this: