Breadcrumbs

Breadcrumbs are secondary navigation elements that show users their location within a website hierarchy, improving navigation, SEO, and overall user experience.

Breadcrumbs are a type of secondary navigation used in websites and applications to help users understand their location within a hierarchy. Typically displayed as a horizontal trail of links, breadcrumbs allow users to quickly backtrack to higher-level pages without relying on the main navigation.

The term originates from the fairy tale of Hansel and Gretel, where the children left a trail of breadcrumbs to find their way back home. In digital design, breadcrumbs serve the same purpose: guiding users through complex structures.

Types of Breadcrumbs

  • Hierarchy-based (Location) – Show the position of a page within the site structure.

    • Example: Home > Products > Electronics > Smartphones
  • Attribute-based – Used in e-commerce, showing selected filters or attributes.

    • Example: Home > Shoes > Men > Size 42 > Black
  • History-based (Path) – Display the user’s actual navigation path.

    • Example: Home > Search > Product Page > Checkout

Example in HTML

<nav aria-label="Breadcrumb">
  <ol>
    <li><a href="/">Home</a></li>
    <li><a href="/products">Products</a></li>
    <li><a href="/products/electronics">Electronics</a></li>
    <li aria-current="page">Smartphones</li>
  </ol>
</nav>

This markup also supports accessibility by providing an aria-label and defining the current page.

Benefits of Breadcrumbs

  • Improved navigation – Users can easily move up the hierarchy.
  • Reduced bounce rates – Visitors can quickly explore related sections.
  • SEO benefits – Search engines like Google display breadcrumbs in search results.
  • Accessibility – Clear paths help all users, including those with screen readers.

Best Practices

  • Always place breadcrumbs at the top of the page, below the header.
  • Use a clear separator (e.g., >).
  • Keep them short and scannable.
  • Ensure they are responsive and work on mobile devices.

Conclusion

Breadcrumbs are a simple but powerful navigation aid that improves usability and SEO. By providing a clear path back through a website’s hierarchy, they make complex sites easier to navigate and more user-friendly.