SolutionsCase StudiesAI ToolsResourcesAboutContact
Get Your Free AI Automation Audit Book a Free 30-Minute Strategy Call
Playground~/frontend Open editor

~/css/breadcrumbs

8 CSS Breadcrumbs

7 Pure CSS1 with JSPublished 2026-10-04Free · no sign-up

Eight breadcrumb trails that show people where they are and let them jump back up the hierarchy. They range from a simple slash trail to arrow-shaped steps, pills, a trail that collapses its middle levels, a version with structured data for search engines and a page header layout.

01. Slash Separated Breadcrumb

NavigationAccessible

The standard breadcrumb: a nav landmark with aria-label="Breadcrumb", an ordered list, and slash separators added with ::before so they are not read aloud. The current page is plain text marked with aria-current="page".

View code
<nav aria-label="Breadcrumb" class="bc">
  <ol>
    <li><a href="#">Home</a></li>
    <li><a href="#">Kitchen</a></li>
    <li><a href="#">Mugs</a></li>
    <li><span aria-current="page">Speckled clay mug</span></li>
  </ol>
</nav>
.bc ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; font: 500 14px Inter, system-ui, sans-serif; }
.bc li + li::before { content: "/"; margin: 0 10px; color: #98a2b3; }
.bc a { color: #475467; text-decoration: none; }
.bc a:hover { color: #101828; text-decoration: underline; }
.bc a:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 3px; }
.bc [aria-current] { color: #101828; font-weight: 700; }

02. Chevron Breadcrumb with Home Icon

NavigationIcon

A breadcrumb that starts with a house icon and uses CSS chevrons between steps. The icon link has an accessible name, the chevrons are drawn with borders on a pseudo-element, and the trail truncates long names with an ellipsis.

View code
<nav aria-label="Breadcrumb" class="bc2">
  <ol>
    <li><a href="#" aria-label="Home"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 11l9-7 9 7v9a1 1 0 01-1 1h-5v-6H9v6H4a1 1 0 01-1-1z"/></svg></a></li>
    <li><a href="#">Settings</a></li>
    <li><a href="#">Billing</a></li>
    <li><span aria-current="page">Invoices and receipts for 2026</span></li>
  </ol>
</nav>
.bc2 ol { box-sizing: border-box; max-width: 100%; display: flex; align-items: center; margin: 0; padding: 0; list-style: none; font: 500 14px Inter, system-ui, sans-serif; }
.bc2 li { display: flex; align-items: center; min-width: 0; }
.bc2 li + li::before { content: ""; width: 6px; height: 6px; margin: 0 12px; border: solid #5d6680; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); flex: none; }
.bc2 a { color: #aab3c7; text-decoration: none; }
.bc2 a:hover { color: #fff; }
.bc2 a:focus-visible { outline: 2px solid #7c9cff; outline-offset: 3px; border-radius: 3px; }
.bc2 svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.bc2 [aria-current] { max-width: 130px; overflow: hidden; color: #fff; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

03. Arrow Step Breadcrumb

StepsShape

Breadcrumb links shaped like arrows that point to the next step, built with clip-path polygons rather than border tricks. The current step is filled with the accent colour, and each arrow overlaps the next slightly with a negative margin.

View code
<nav aria-label="Breadcrumb" class="bc3">
  <ol>
    <li><a href="#">Cart</a></li>
    <li><a href="#">Details</a></li>
    <li><span aria-current="page">Shipping</span></li>
    <li><span class="todo">Payment</span></li>
  </ol>
</nav>
.bc3 ol { display: flex; margin: 0; padding: 0; list-style: none; font: 600 13.5px Inter, system-ui, sans-serif; }
.bc3 a, .bc3 span { display: block; padding: 10px 16px 10px 22px; margin-right: -8px; background: #e4e7ec; color: #344054; text-decoration: none; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); }
.bc3 li:first-child a { padding-left: 18px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }
.bc3 a:hover { background: #d0d5dd; }
.bc3 [aria-current] { background: #4f46e5; color: #fff; }
.bc3 .todo { background: #f2f4f7; color: #5d6679; }
.bc3 a:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }

04. Pill Breadcrumb

NavigationPills

Each level is a rounded pill with a subtle border, separated by a dot. It reads clearly on busy dark dashboards, and the hover and focus states raise the pill slightly so it is obvious which level you are about to open.

View code
<nav aria-label="Breadcrumb" class="bc4">
  <ol>
    <li><a href="#">Workspace</a></li>
    <li><a href="#">Marketing</a></li>
    <li><span aria-current="page">Autumn campaign</span></li>
  </ol>
</nav>
.bc4 ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; font: 600 13.5px Inter, system-ui, sans-serif; }
.bc4 li + li::before { content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 6px; border-radius: 50%; background: #5d6680; vertical-align: middle; }
.bc4 a, .bc4 span { display: inline-block; padding: 6px 12px; border: 1px solid #2f3749; border-radius: 999px; color: #c9d1e2; text-decoration: none; transition: transform .15s, border-color .15s; }
.bc4 a:hover, .bc4 a:focus-visible { border-color: #7c9cff; color: #fff; transform: translateY(-1px); outline: none; }
.bc4 [aria-current] { border-color: transparent; background: #7c9cff; color: #0e1118; }

05. Collapsing Breadcrumb

ResponsiveJavaScript

Long trails collapse their middle levels into an ellipsis button, so the first and last levels always fit. Pressing the button reveals the hidden levels; the button has aria-expanded and a clear name, and the full trail stays in the HTML.

View code
<nav aria-label="Breadcrumb" class="bc5">
  <ol>
    <li><a href="#">Docs</a></li>
    <li class="more"><button type="button" aria-expanded="false" aria-label="Show 3 more levels">&hellip;</button></li>
    <li class="mid"><a href="#">Guides</a></li>
    <li class="mid"><a href="#">Stores</a></li>
    <li class="mid"><a href="#">Payments</a></li>
    <li><span aria-current="page">Refunds</span></li>
  </ol>
</nav>
.bc5 ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; font: 500 14px Inter, system-ui, sans-serif; }
.bc5 li + li::before { content: "\203A"; margin: 0 9px; color: #98a2b3; }
.bc5 .mid { display: none; }
.bc5.open .mid { display: flex; }
.bc5.open .more { display: none; }
.bc5 a { color: #475467; text-decoration: none; }
.bc5 a:hover { text-decoration: underline; }
.bc5 button { padding: 2px 8px; border: 0; border-radius: 6px; background: #eef0f4; color: #344054; font: 700 14px Inter, sans-serif; cursor: pointer; }
.bc5 button:focus-visible, .bc5 a:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.bc5 [aria-current] { color: #101828; font-weight: 700; }
const nav = document.querySelector('.bc5'), more = nav.querySelector('.more button');
more.addEventListener('click', () => {
  nav.classList.add('open');
  more.setAttribute('aria-expanded', 'true');
  nav.querySelector('.mid a').focus();
});

06. Breadcrumb with Structured Data

SEOSchema

A breadcrumb marked up with schema.org BreadcrumbList microdata, so search engines can show the trail in results. Each item carries its position, name and URL, and the visual design stays the same as an ordinary breadcrumb.

View code
<nav aria-label="Breadcrumb" class="bc6">
  <ol itemscope itemtype="https://schema.org/BreadcrumbList">
    <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a itemprop="item" href="https://example.com/"><span itemprop="name">Home</span></a><meta itemprop="position" content="1"></li>
    <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a itemprop="item" href="https://example.com/blog/"><span itemprop="name">Blog</span></a><meta itemprop="position" content="2"></li>
    <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><span itemprop="name" aria-current="page">Packaging ideas</span><meta itemprop="position" content="3"></li>
  </ol>
</nav>
.bc6 ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font: 500 14px Inter, system-ui, sans-serif; }
.bc6 li + li::before { content: "\2192"; margin: 0 10px; color: #5d6680; }
.bc6 a { color: #93c5fd; text-decoration: none; }
.bc6 a:hover { text-decoration: underline; }
.bc6 a:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.bc6 [aria-current] { color: #fff; font-weight: 600; }

07. Breadcrumb Bar with Page Title

HeaderLayout

A page header that pairs a small breadcrumb with the large page title and an action button, as admin dashboards often do. The breadcrumb sits above the h1 in its own nav landmark, and the layout wraps the button below the title on narrow screens.

View code
<header class="ph">
  <div>
    <nav aria-label="Breadcrumb"><ol><li><a href="#">Products</a></li><li><a href="#">Ceramics</a></li><li><span aria-current="page">Edit product</span></li></ol></nav>
    <h1>Speckled clay mug</h1>
  </div>
  <a class="act" href="#">Preview</a>
</header>
.ph { box-sizing: border-box; max-width: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; width: min(560px, 94vw); padding: 20px 22px; border-radius: 16px; background: #fff; box-shadow: 0 8px 26px -14px rgba(16,24,40,.3); font-family: Inter, system-ui, sans-serif; }
.ph ol { display: flex; margin: 0 0 6px; padding: 0; list-style: none; font-size: 13px; }
.ph li + li::before { content: "/"; margin: 0 8px; color: #98a2b3; }
.ph a { color: #475467; text-decoration: none; }
.ph a:hover { color: #101828; }
.ph [aria-current] { color: #101828; }
.ph h1 { margin: 0; color: #101828; font-size: 24px; letter-spacing: -.01em; }
.act { padding: 9px 16px; border: 1.5px solid #d0d5dd; border-radius: 10px; color: #101828 !important; font-weight: 700; font-size: 14px; }
.ph a:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

08. Animated Underline Breadcrumb

HoverMinimal

A minimal breadcrumb where each link gets an underline that slides in from the left on hover or focus. The underline is a background gradient that grows in width, and the motion is disabled for people who prefer reduced motion.

View code
<nav aria-label="Breadcrumb" class="bc7">
  <ol>
    <li><a href="#">Journal</a></li>
    <li><a href="#">Studio notes</a></li>
    <li><span aria-current="page">Firing schedule</span></li>
  </ol>
</nav>
.bc7 ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font: 500 15px Inter, system-ui, sans-serif; }
.bc7 li + li::before { content: "\2014"; margin: 0 10px; color: #5d6680; }
.bc7 a { padding-bottom: 2px; color: #c9d1e2; text-decoration: none; background: linear-gradient(#fbbf24, #fbbf24) left bottom / 0 2px no-repeat; transition: background-size .25s, color .25s; }
.bc7 a:hover, .bc7 a:focus-visible { background-size: 100% 2px; color: #fff; outline: none; }
.bc7 [aria-current] { color: #fbbf24; }
@media (prefers-reduced-motion: reduce) { .bc7 a { transition: none; } }

About these CSS Breadcrumbs

The right markup

Wrap the trail in <nav aria-label="Breadcrumb"> so it is a named landmark, and use an ordered list because the order matters. The last item is the current page: show it as plain text with aria-current="page" rather than a link to itself.

Separators in CSS

Add the slash, chevron or arrow with li + li::before. Separators drawn by CSS are not read aloud as part of each link, so screen reader users hear clean link names without repeated symbols.

Long trails on small screens

Deep hierarchies overflow on phones. Either let the list wrap, truncate the current page with text-overflow: ellipsis, or collapse the middle levels behind a button with aria-expanded, as the collapsing demo does.

Breadcrumbs and search

Search engines can show a breadcrumb trail in results when the page carries BreadcrumbList structured data, either as JSON-LD or as microdata like the schema demo. Keep the names and URLs identical to the visible trail.

Frequently asked questions

Should the current page be a link?

No. Mark it with aria-current="page" and show it as text, since linking to the page you are on is confusing.

Do breadcrumbs help SEO?

They help people and search engines understand your site structure, and structured data can make the trail appear in results.

Which demos use JavaScript?

Only the collapsing breadcrumb, to reveal the hidden levels.