A navigation bar, or navbar, is the row of links that lets visitors move between the main parts of a website: Services, About, Pricing, Contact and so on. It normally sits in the header at the top of every page, so it is always available no matter where someone lands.
How a navbar is built
In HTML, the menu sits inside a <nav> element, normally as a list of links. That element tells screen readers "this is navigation", which lets users jump to it or skip it. The current page should be marked with aria-current="page" and a visible style so people know where they are. Menus with sub-items open as dropdowns; well-built ones work with a keyboard as well as a mouse, and do not snap shut the moment the pointer drifts slightly.
Choosing what goes in it
The menu is a summary of your site's structure, so it follows from your information architecture. Use the words customers use, not internal jargon: "Prices" is clearer than "Investment", "Services" beats "Solutions". Five to seven top-level items is a sensible ceiling for most small sites. Put the most important items at the start and end, since people tend to notice those positions most, and make the main action (Book, Quote, Shop) a button rather than another link.
Example: a wedding photographer
A photographer's menu had nine items: Home, About, Portfolio, Weddings, Engagements, Elopements, Blog, Testimonials, Contact. Grouping the three shoot types under "Weddings", folding Testimonials into the About page, dropping "Home" (the logo already links there) and turning Contact into a "Check availability" button leaves five clear choices. On phones they collapse behind a hamburger menu icon, with the button kept visible.
When to revisit your navigation
Whenever you add a page, ask whether it belongs in the main menu or somewhere secondary such as the footer, a sidebar or links inside content. Menus grow one item at a time until they stop working. Analytics showing visitors repeatedly using site search for something that should be in the menu is a good prompt to rethink it.
Navigation mistakes
- Vague labels. "Resources" and "Solutions" force people to guess what is behind them.
- Hover-only dropdowns. Touchscreens have no hover, and keyboard users cannot reach the sub-items.
- Different menus on different pages. Keep it consistent so people build a mental map.
- Nesting three levels deep. If you need menus inside menus inside menus, the site structure itself needs simplifying.
Related terms
- Header: the area that usually holds the navbar.
- Hamburger menu: how the navbar collapses on phones.
- Breadcrumb navigation: shows where a page sits in the hierarchy.
- Information architecture: the structure the menu reflects.