Why use list to do navigation menu instead of buttons?
1529 просмотра
3 ответа
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 Источник Размещён: 13.11.2019 11:30Ответы (3)
5 плюса
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:574 плюса
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
3 плюса
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Вопросы из категории :
- html Определить часовой пояс пользователя
- html Как определить, какой из указанных шрифтов был использован на веб-странице?
- html Как мне дать моим веб-сайтам значок для iPhone?
- html Как отключить автозаполнение браузера в поле веб-формы / теге ввода?
- html Как автоматически изменить размер текстовой области с помощью Prototype?
- button Как заставить кнопку выглядеть так, как будто она нажата?
- button Нажать кнопку «JavaScript» на кнопке «Ввод» в текстовом поле.
- button YUI Меню расположено позади div
- button Добавление кнопки в ListView в WinForms
- button Javascript Подтвердите всплывающее окно Да, нет кнопки вместо OK и Отмена
- navigation Программно выделите тег привязки
- navigation Навигация в Джанго
- navigation Запустить внешнее приложение / активность и добавить свой собственный заголовок?
- navigation Фреймворк Silverlight MVVM с навигацией
- navigation Вертикальная навигация по JavaScript
- html-lists Как вы можете настроить номера в упорядоченном списке?
- html-lists Можно ли указать начальный номер для упорядоченного списка?
- html-lists Как сделать отображение <ul> в горизонтальном ряду
- html-lists Лучшая практика предоставления заголовка, заголовка или метки для списка в HTML
- html-lists Центр <ul> <li> в div