Navigation bar using list elements instead of table elements

by David Alfaro 6. October 2008 10:04

What are we facing?

You want a navigation bar that degrades gracefully on text based browsers. You will also want to have a navigation bar constructed with the correct elements to express the closest semantics to a “Navigation Bar”.

The Solution

The most currently recommended way to express Navigation Bars is using list elements. Semantically, navigation bars are simple lists of links to interest points of the site, that is, is just one dimension, it doesn’t justify the use of table elements. Tables are meant for data tabulation. Besides, tables are not friendly with text based browsers.

If you take a look at the source of this site’s Navigation Bar you will see something like:

          <ul>
                 <li><a href="http://www.aggiorno.com/default.aspx">home</a></li>
                 <li><a href="http://www.aggiorno.com/about-aggiorno.aspx">products</a></li>
                 <li><a href="http://www.aggiorno.com/try.aspx">download</a></li>
                 <li><a href="http://www.aggiorno.com/learn.aspx">aggiornings</a></li>
                 <li><a class="redlink" href="http://www.aggiorno.com/blog">blog</a></li>
                 <li><a href="http://www.aggiorno.com/contact.aspx">contact</a></li>
          </ul>

Using CSS magic, you can disable bullets, reveal content for browsers supporting CSS and hide content for those text based browsers.

Some external references

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

css | seo | idea | accessibility

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



About Aggiorno KC

Aggiorno RSS Feeds As Web developers, we are always hunting for pieces of wisdom spread all over the Web, by friends, by books, or both. Normally it requires time and effort to search and locate that wisdom and then even more to implement it. Knowledge Capsules provide you with a consolidated place to find all the specific pieces of code and advice you are commonly looking for, all provided by fellow Web developers.

IE8 Compatibility Wizard

Automatically upgrades your website to render correctly in IE8!

Internet Explorer 8 Compatibility Wizard

Get it today!


ArtinSoft Corporation ArtinSoft is Microsoft Certified Partner ISV/Software Solutions and Microsft Visual Studio Partner

With over fifteen years of experience, ArtinSoft has proven to be a key player in software evolution, by allowing customers from all over the world to ensure business continuity and compliance through software migration solutions and developer tools created upon principles of artificial intelligence. At present time, ArtinSoft Corporation remains a private firm in constant growth through a strategic partner network. Read More...