How to design a website header and menu people can find their way with

What goes in a website header, navigation bar patterns and when each fits, real examples from live sites, accessibility, layout shift, mobile and the HTML.

Summarize with
Homelo landing page on a laptop: a header with the Homelo logo, Home, About, How It Works, Properties and FAQs links and a Contact Us button, above the huge Homelo name and a modern glass house

Good navigation bar design keeps the main sections of a site visible, names them in words visitors already use, shows where they are, and gives one clear next step. A website header usually holds the logo (linked to the home page), the primary navigation, a short utility area such as search or sign in, and one call to action button. On desktop, show the links rather than hiding them behind a menu icon; on phones, a menu button is fine as long as the call to action stays visible. Underneath, it should be a labelled nav with real links, dropdowns built as simple disclosure buttons, a skip link, and a fixed height so nothing shifts as the page loads.

I'm a design engineer: I design websites and build them in code, so I treat the header as both a layout and the first block of HTML on every page. Below: the parts, the patterns, live examples and the markup I start from. It's part of my website design work.

Header, navigation bar or hero?

  • Header: the band at the top of every page; in HTML, a header directly in the body.
  • Navigation bar: the links inside it that move people between main sections; a nav element.
  • Hero: the first big section under the header, which changes from page to page. Some "header design" galleries show heroes; this guide is about the header.

What goes in a website header

ElementWhy it's thereNotes
LogoSays whose site this is, and links homeLeft on left-to-right sites
Primary navigationThe main sectionsVisible on desktop
Utility linksSign in, search, language, cartSmaller, usually on the right
One call to actionThe step you want most visitors to takeA button, styled as the page's primary action
Skip linkLets keyboard users jump past the headerHidden until focused

Leave out what changes per page (that's the hero's job), promotional banners that push the content down, and social icons (the footer is a better home for those; see my guide to website footer design).

How many navigation items, and how to label them

There's no magic number. The Nielsen Norman Group's menu design checklist (Page Laubheimer, June 2024) doesn't set one; it asks for clear, familiar wording, key terms first, and no made-up words or jargon. The real limit is width: if items stop fitting on one line at common laptop widths, you have too many or your labels are too long.

What I do:

  • Use the words visitors search with. "Pricing", not "Plans and Packages"; "Services", not "Capabilities".
  • Front-load the distinctive word. "Website design" and "App design", not "Design: websites" and "Design: apps".
  • Mark the current page. NN/g calls failing to show the current location probably the single most common mistake it sees on website menus. Use a visible style and aria-current="page".
  • Signal dropdowns with a caret, as the checklist advises, so people can tell links from menus.

Navigation bar patterns, and when each fits

Horizontal bar

Logo left, links in a row, utilities and a button on the right. NN/g's checklist lists the header as where people expect primary navigation on websites. Use it whenever your sections fit.

Dropdowns and mega menus

For sections with many pages, NN/g's mega menu article (Jakob Nielsen and Angie Li, 2017) describes big two-dimensional panels of grouped options, all visible without scrolling, and says user testing shows they work. The checklist adds two rules: open submenus on click, not hover, because touch and keyboard users have no hover; and avoid cascading menus, using a mega menu or a landing page instead.

Hamburger menu

A menu icon that hides the links. NN/g's checklist calls it a necessary evil on small screens and says it isn't appropriate for desktop: out of sight means out of mind. Its study of 179 participants on six sites (Kara Pernice and Raluca Budiu, 2016) found hiding navigation hurt the experience on desktop and on mobile, with a smaller effect on mobile. My rule: hamburger on phones only, with the call to action kept outside it.

Sticky and hide-on-scroll headers

A sticky header stays at the top as people scroll. NN/g's sticky header article (Page Laubheimer, 2021) says they help when they're small, contrast with the content and move little. A partially persistent header hides on the way down and slides back when people scroll up; NN/g suggests a slide-in of roughly 300 to 400ms. I keep sticky headers short, especially on phones, where every pixel of header is a pixel of content gone.

Bottom navigation in mobile apps

Android's navigation bar guidance says to use it for three to five destinations of equal importance. Apple's tab bar guidelines say to keep the tab bar visible between sections and not to disable or hide its buttons. On websites, I don't copy app tab bars; people expect a header with a menu button.

Sidebar navigation in web apps

NN/g's checklist says people expect primary navigation on the left side in applications. A sidebar holds more items and leaves the top bar for search, notifications and the account menu; Apple's sidebar guidelines describe the same role.

The call to action in the header

One button, styled as the primary action, on the right. Sign in, if needed, becomes a quieter link or secondary button beside it. Pick the action most first-time visitors should take: book a call, start a trial, get a quote. On phones, keep it in the bar next to the menu icon.

Real header examples

I read these headers from each site's served HTML on 10 November 2026. Headers change often, and anything added later by scripts may be missing.

  • Stripe: Products, Solutions, Developers and Resources open panels, then Pricing and Guide me as plain links. On the right, Sign in is a secondary button and Contact sales the primary one. The panel triggers are buttons with aria-expanded, and there are no ARIA menu roles.
  • Linear: Product and Resources open panels; Customers, Pricing, Now, Contact and Docs are links. Log in sits beside a Sign up button. The nav is labelled "Main", and the page starts with a "Skip to content" link.
  • GitHub: Products, Developers, Businesses and Resources open panels from buttons with aria-expanded, inside a nav labelled "Global". The panels group links under headings with a one-line description each, a mega menu in practice. It also has a "Skip to content" link.
  • GOV.UK: a Menu button and a search button, both with aria-expanded. The menu opens two groups, "Services and information" with topics such as Benefits and Money and tax, and "Government activity" with Departments, News and Guidance. The first link on the page is "Skip to main content".
  • Apple: a nav labelled "Global" with Store, Mac, iPad, iPhone, Watch, Vision, AirPods, Home, Entertainment, Accessories and Support, then search and bag icons with accessible names. No button in the bar: the products are the call to action.

Navigation bar accessibility

A labelled landmark. Put the links in a nav. The W3C's landmark guidance says that when a page has more than one navigation landmark, each needs a unique label, such as aria-label="Main" in the header and aria-label="Footer" below.

A skip link. WCAG 2.4.1 Bypass Blocks, Level A, asks for a way to skip repeated content. A "Skip to main content" link as the first focusable element does it.

Disclosure buttons, not ARIA menus. The W3C's disclosure navigation example avoids the menu role on purpose: typical site navigation doesn't need the keyboard behaviour assistive technology expects from a menu. Adrian Roselli's Don't Use ARIA Menu Roles for Site Nav explains the fallout: users are told to expect arrow keys, Home, End and more. A button with aria-expanded showing a list of links is enough.

Escape and focus. In the same example, Escape closes an open dropdown and returns focus to its button. Keep focus order visual and focus rings visible.

Don't hide focus under a sticky header. WCAG 2.4.11 Focus Not Obscured (Minimum), Level AA, names sticky headers as a typical cause of focused items being hidden. Its listed technique is CSS scroll-padding: set scroll-padding-top to the header's height.

Contrast and size. Links on a transparent header over a hero photo often fail contrast; NN/g's checklist calls this out too. Text needs 4.5:1, and targets at least 24 by 24 CSS pixels under 2.5.8.

The current page. aria-current="page" on the active link, which MDN defines as the current page within a set of pages.

Performance: a header that never shifts the page

Google's Cumulative Layout Shift guide sets a good score at 0.1 or less and recommends animating with transform rather than size or position properties. For headers:

  • Fix the header's height at each breakpoint, and set width and height on the logo.
  • Don't inject banners above the header after load. Reserve their space or put them below.
  • Hide and show sticky headers with transform: translateY(), not by changing top or height, and respect prefers-reduced-motion.
  • Render the links in the HTML, not only with JavaScript, so they show up at once and crawlers can follow them.

Navigation on mobile

On phones, the header becomes logo, call to action and a menu button. NN/g warns against full-screen menus on large screens but notes the rule probably breaks on mobile; a full-screen phone menu is fine if closing it is easy. Test at 320 CSS pixels wide, which is the width WCAG 1.4.10 Reflow uses: nothing in the header should force sideways scrolling.

The header HTML I start from

<a class="skip-link" href="#main">Skip to main content</a>

<header class="site-header">
  <a href="/" class="logo"><img src="/logo.svg" alt="Company name" width="120" height="32"></a>

  <nav aria-label="Main">
    <ul>
      <li>
        <button type="button" aria-expanded="false" aria-controls="services-menu">Services</button>
        <ul id="services-menu" hidden>
          <li><a href="/website-design">Website design</a></li>
          <li><a href="/development">Development</a></li>
        </ul>
      </li>
      <li><a href="/work" aria-current="page">Work</a></li>
      <li><a href="/about">About</a></li>
    </ul>
  </nav>

  <a class="button" href="/contact">Book a call</a>
</header>

<main id="main">...</main>
document.querySelectorAll('.site-header [aria-expanded]').forEach((button) => {
  const panel = document.getElementById(button.getAttribute('aria-controls'));
  const setOpen = (open) => {
    button.setAttribute('aria-expanded', String(open));
    panel.hidden = !open;
  };
  button.addEventListener('click', () => setOpen(button.getAttribute('aria-expanded') !== 'true'));
  button.parentElement.addEventListener('keydown', (event) => {
    if (event.key === 'Escape' && !panel.hidden) {
      setOpen(false);
      button.focus();
    }
  });
});
.site-header { position: sticky; top: 0; height: var(--header-height); }
html { scroll-padding-top: var(--header-height); }
.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

On a phone, the same nav sits behind one more disclosure button labelled "Menu". I also close an open panel when focus or a click moves outside it.

Headers from my own work

On Homelo, a landing page I designed for a real estate company, the menu keeps five items, Home, About, How It Works, Properties and FAQs, with a contact button in the menu and one yellow Get Started button in the hero below. Each label is a word or two a buyer would use themselves.

On Wave, a Webflow website I designed for a medical software SaaS, the top bar keeps six short links, from Home to Contact, plus Login and a yellow Get Started button. Yellow marks every main action, so that button is easy to find. On the phone the navigation folds into a menu icon, and the inner pages reuse the same header. For more complete pages, see my SaaS website examples.

Frequently asked questions

What should a website header include?

The logo linked to the home page, the primary navigation, utility links such as sign in or search, one call to action button and a skip link for keyboard users.

How many items should a navigation bar have?

As many as fit on one line at common laptop widths with clear labels. NN/g sets no fixed number.

Should I use a hamburger menu on desktop?

No. NN/g's research found hidden navigation hurts discovery, more so on desktop. Show the links on large screens and use a menu button only where space runs out.

Should my header be sticky?

On long pages, a small sticky or hide-on-scroll header helps. Keep it short and set scroll-padding-top so it never hides focused elements.

Should navigation dropdowns open on hover or click?

On click. Touch and keyboard users have no hover, and accidental hover opens frustrate everyone.

Can you design and build my website's header and navigation?

Yes. I design websites and build them in React and Next.js, header and navigation included, with the accessibility and performance details above. See my website design page.

Sources and method

I searched "navigation bar design" and "website header design" on 10 November 2026 and read the top results. Most were best practice lists and galleries; few covered disclosure markup, focus behind sticky headers or layout shift, so this guide adds those. I read every source and every header below on 10 November 2026.

  • Nielsen Norman Group, Menu-Design Checklist: 17 UX Guidelines, checked 10 November 2026: nngroup.com
  • Nielsen Norman Group, Mega Menus Work Well for Site Navigation, checked 10 November 2026: nngroup.com
  • Nielsen Norman Group, Hamburger menus and hidden navigation on mobile, checked 10 November 2026: nngroup.com
  • Nielsen Norman Group, Sticky Headers: 5 Ways to Make Them Better, checked 10 November 2026: nngroup.com
  • W3C, ARIA Authoring Practices, disclosure navigation example and landmark regions, checked 10 November 2026: w3.org
  • W3C, Understanding SC 2.4.1 Bypass Blocks, 2.4.11 Focus Not Obscured (Minimum), 2.5.8 Target Size (Minimum) and 1.4.10 Reflow, checked 10 November 2026: w3.org
  • Adrian Roselli, Don't Use ARIA Menu Roles for Site Nav, checked 10 November 2026: adrianroselli.com
  • MDN, aria-current, checked 10 November 2026: developer.mozilla.org
  • web.dev, Cumulative Layout Shift, checked 10 November 2026: web.dev
  • Android Developers, Navigation bar, checked 10 November 2026: developer.android.com
  • Apple, Human Interface Guidelines, Tab bars and Sidebars, checked 10 November 2026: developer.apple.com
  • Headers of Stripe, Linear, GitHub, GOV.UK and Apple, HTML read 10 November 2026: stripe.com, linear.app, github.com, gov.uk, apple.com

If you're planning a new website or a redesign and want the header, navigation and every page designed and built as one piece of work, book a free 30 minute intro call. After it, you get a written scope and one fixed quote.

Tags: Navigation bar design, Website header design, Website design, Accessibility, Web performance

Keep reading

Let’s look at your product.

A free 30 minute call. You leave with a clear next step, whether we work together or not.

Book a free intro call