W3C home > Mailing lists > Public > public-vocabs@w3.org > February 2012

Re: Breadcrumbs: Last Item Not Hyperlinked

From: Gunnar Bittersmann <gunnar@bittersmann.de>
Date: Fri, 10 Feb 2012 15:48:58 +0100
Message-ID: <4F352E5A.3050707@bittersmann.de>
To: public-vocabs@w3.org
Irfanullah Jan scripsit:
> However, I want to remove the <a> element from the last item, because I
> think it is unnecessary to link to current page.

You might keep the <a> element, just remove its @href attribute. The 
HTML5 spec says, If the a element has no href attribute, then the 
element represents a placeholder for where a link might otherwise have 
been placed, if it had been relevant. 

>     <a href="category/books-literature.html">Literature & Fiction</a> >

Youd better escape the ampersand. Your mark-up might look like

<div itemprop="breadcrumb">
   <a href="category/books.html">Books</a> >
   <a href="category/books-literature.html">Literature &amp; Fiction</a> >

or as a list

<ol itemprop="breadcrumb">
   <li><a href="category/books.html">Books</a></li>
   <li><a href="category/books-literature.html">Literature & 

with style

[itemprop="breadcrumb"] li:not(:last-child)::after { content: ' >' }

Received on Friday, 10 February 2012 14:49:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:29:22 UTC