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.
What goes in a website header
| Element | Why it's there | Notes |
|---|---|---|
| Logo | Says whose site this is, and links home | Left on left-to-right sites |
| Primary navigation | The main sections | Visible on desktop |
| Utility links | Sign in, search, language, cart | Smaller, usually on the right |
| One call to action | The step you want most visitors to take | A button, styled as the page's primary action |
| Skip link | Lets keyboard users jump past the header | Hidden 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).
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
navis 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 anavlabelled "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
navlabelled "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.
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 changingtoporheight, and respectprefers-reduced-motion. - Render the links in the HTML, not only with JavaScript, so they show up at once and crawlers can follow them.
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



