Should navigation bars always be in the form of lists?

Firstly, it is unfortunate if this is not a "true" stackoverflow issue. But this is what I always thought about ...

When you code the site navigation bar (html), I read that this is a very good practice, if not ONLY practicing its implementation using a list tag. eg.

<ul> <li> Home </li> <li>About Us</li> <li>Blog</li> <li>Contact Us</li> </ul> 

And then apply the necessary style that displays the list horizontally, etc. etc.

But this standard is set in stone or does it only so if it is the best option for this ... Because currently I have a navigation bar so that it is not your standard nv bar, so to speak, and this is a small mission, to implement it as a list. A few link tags placed in some divs will work well. But, of course, I do not want to do this method if it is going to make people point and laugh at me ...

Thanks in advance!

+7
source share
1 answer

Why use lists to navigate your site?

Part of website design using web standards involves the use of semantically correct code. To quote " Brainstorming and Raves :

A good HTML structure is based on logic, order, and semantically correct markup. If you have a headline, use a heading element starting at H1. If you have a paragraph, use a paragraph element. If you have a list, use a list item element.

At a structural level, site navigation is simply a list of links to other areas of the site. Therefore, the best way to mark up site navigation is (possibly) to use a list item.

If you use a good HTML structure, then text browsers, screen readers, non-CSS browsers, CSS browsers are disabled, and search engines can more easily access your content.

Good article about it here.

+7
source

All Articles