Monday, 20 May 2013

ul or nav for breadcrumbs in HTML?

ul or nav for breadcrumbs in HTML?

The Foundation front-end framework provides 2 ways of representing breadcrumbs in HTML:
<ul class="breadcrumbs">
  <li><a href="#">Home</a></li>
  <li><a href="#">Features</a></li>
  <li class="unavailable"><a href="#">Gene Splicing</a></li>
  <li class="current"><a href="#">Cloning</a></li>
</ul>
And this way with nav and a elements instead of ul and li:
<nav class="breadcrumbs">
  <a href="#">Home</a>
  <a href="#">Features</a>
  <a class="unavailable" href="#">Gene Splicing</a>
  <a class="current" href="#">Cloning</a>
</nav>
Which way is semantically more appropriate?

No comments:

Post a Comment