Why use list to do navigation menu instead of buttons?

html button navigation html-lists

1529 просмотра

3 ответа

6827 Репутация автора

I have inspected many navigation menus on the internet, and they often use lists instead of a button. What is the reason behind this? Why use the button? Thank you.

Автор: Tattat Источник Размещён: 11.04.2011 01:45

Ответы (3)


4 плюса

6370 Репутация автора

Generally lists are used for navigation items in HTML because they are presenting a list of navigation options to the user.

HTML5 offers a bit more semantic precision using menu and nav

Автор: edeverett Размещён: 11.04.2011 01:51

3 плюса

2527 Репутация автора

The semantics of a list make it look more like a grouped section, that's all I can think of. There is no real (dis)advantage for using list items over other methods of defining a menu.

Автор: Gerben Jacobs Размещён: 11.04.2011 01:52

5 плюса

1256 Репутация автора

There are (at least) two good reasons to use lists. Using lists can help to give an idea of your site's structure which is good in terms of SEO but also if people use either custom CSS or screen readers for accessibility reasons. The second and slightly related one is that it's rather helpful when it comes to creating stylesheets. You don't need to come up with your own way of nesting elements. Just use lists and go from there. Then you can focus on getting the stylesheet right providing different styles for different hierarchy levels, first, last, odd or even list items.

Автор: klotz Размещён: 11.04.2011 01:57
Вопросы из категории :
32x32