Anatomy of a responsive navbar
Essential pieces and semantic HTML structure.
A typical responsive navbar includes a main wrapper, a logo or brand area, a hamburger button that is visible only on mobile, and a navigation menu that collapses when space becomes tight.
On desktop, the navigation stays horizontal. On mobile, the links are hidden and the hamburger button reveals them vertically or inside an off-canvas panel.
The HTML should stay accessible: use ``, a real `` for the toggle with `aria-expanded` and `aria-controls`, and `
- /
- ` for the navigation links.