February 23, 2004 · Dan Cederholm

SimpleQuiz › Part XII › Breadcrumbs › Conclusion

Looking over over the last SimpleQuiz, one of the comments that struck me was one by Darrel:

In terms of an anology, it refers to leaving a trail based on where you've been. Very few navigation systems actually do that though. Rather, they show you were you are in relation to the site structure.

Great point -- and one that I think rules out a few of the other markup possibilities. An ordered list would be appropriate only if the list of links were an accurate trail of where the user has been. This is oftentimes not the case, as Darrel notes.

The other interesting method that was mentioned was the nesting of unordered lists to convey a hierarchy of directory structure. This could be the most semantic way of presenting the list of links -- but as many suggested, it's a bit of a markup overkill.

As Doug said:

...no one really wants to code this:

<ul>
 <li><a href="/">Home</a>
  <ul>
   <li><a href="/articles/">Articles</a>
    <ul>
     <li><a href="/articles/file.html">Title</a></li>
    </ul>
   </li>
  </ul>
 </li>
</ul>

It accurately portrays site structure ... And nested lists represent a snippet of a site map in outline form.

Here's a case (and this happens from time to time) where perhaps the method that's more semantically rich, adds way more code than really necessary. And it's got me scratching my head saying "it's all about compromises again".

If semantic purity is your goal, then nested lists may be the way for you -- if simplicity is what you're after, something like Method A might work.

The past few conclusions have me sounding like broken record -- that it's all about balance: Semantics vs. practicality vs. simplicity vs. requirements. Somewhere in the middle is usually just right.