Breadcrumb navigation shows users their location within a site hierarchy and provides a path back to parent pages. These examples cover basic text paths, icon separators, collapsed middle items with ellipsis, dropdown menus for lateral navigation, and fully semantic nav elements with ARIA attributes.
Basic Breadcrumbs
Simple text-based breadcrumbs with a slash separator. The current page is non-interactive and visually distinct from clickable ancestors. This is the most common pattern for documentation sites and blogs.
basic-breadcrumbs
Live
untitled.html
HTML
1
<nav class="breadcrumbs" aria-label="Breadcrumb">
2
<ol>
3
<li>
4
<a href="#">
5
Home
6
</a>
7
</li>
8
<li>
9
<a href="#">
10
Products
11
</a>
12
</li>
13
<li>
14
<a href="#">
15
Electronics
16
</a>
17
</li>
18
<li aria-current="page">
19
Wireless Headphones
20
</li>
21
</ol>
22
</nav>
untitled.css
CSS
1
.breadcrumbs {
2
padding:20px 24px;
3
font-family:system-ui,
4
sans-serif
5
}
6
.breadcrumbs ol {
7
list-style:none;
8
display:flex;
9
flex-wrap:wrap;
10
align-items:center;
11
gap:0;
12
margin:0;
13
padding:0
14
}
15
.breadcrumbs li {
16
display:flex;
17
align-items:center;
18
font-size:13px;
19
color:#808080
20
}
21
.breadcrumbs li:not(:last-child)::after {
22
content:'/';
23
margin:0 10px;
24
color:#444;
25
font-size:12px
26
}
27
.breadcrumbs a {
28
color:#808080;
29
text-decoration:none;
30
transition:color .2s
31
}
32
.breadcrumbs a:hover {
33
color:#00FF41
34
}
35
.breadcrumbs li[aria-current="page"] {
36
color:#E0E0E0;
37
font-weight:600
38
}
preview
Chevron Separators
SVG chevron icons as separators provide a cleaner, more modern look than text characters. The CSS ::after pseudo-element uses a data URI for the SVG, keeping the HTML clean. Inline SVGs on the home icon provide crisp rendering at any size.
Adding contextual icons next to breadcrumb labels helps users quickly identify each level. Use small inline SVGs or emoji icons for recognition. This pattern works well in file managers and CMS admin interfaces where each level has a distinct type.
For deep hierarchies, collapse middle items into a clickable ellipsis button. This saves horizontal space while keeping the root and current page visible at all times. Hovering or clicking the ellipsis reveals the hidden items in a dropdown, preserving the full path context.
Each breadcrumb level can open a dropdown showing siblings at that depth. Users can jump laterally without going back up the tree — ideal for file managers, CMS interfaces, and deep product catalogs. The chevron-down icon rotates on hover to indicate interactivity.
Compact breadcrumb pills with backgrounds on each segment. Works well in toolbars, dashboards, and narrow sidebar layouts where vertical space is at a premium. The active item uses a green accent background.
Ultra-minimal breadcrumbs with no separator character — just spacing and color hierarchy. Links are medium gray, the current page is white and bold. This works well when the breadcrumb lives inside a card or panel.
Breadcrumbs should use a <nav> element with aria-label="Breadcrumb", an ordered list, and aria-current="page" on the last item. This ensures screen readers announce the full path correctly and distinguish the breadcrumb from other navigation landmarks.
breadcrumb-structure.html
HTML
1
<nav class="breadcrumbs" aria-label="Breadcrumb">
2
<ol>
3
<li>
4
<a href="/"><!-- home icon --> Home</a>
5
</li>
6
<li>
7
<a href="/products">Products</a>
8
</li>
9
<li>
10
<a href="/products/electronics">Electronics</a>
11
</li>
12
<li aria-current="page">
13
Wireless Headphones
14
</li>
15
</ol>
16
</nav>
ℹ
info
Always wrap breadcrumbs in a <nav> element with aria-label="Breadcrumb" so screen readers distinguish it from other navigation. Use an ordered list (<ol>) to convey hierarchy, and mark the current page with aria-current="page".
✓
best practice
For pages with more than 4 levels, collapse middle items behind an ellipsis or use dropdown menus. Showing every level in a flat list becomes overwhelming on mobile viewports and hinders quick scanning. Keep the root link (usually Home) visible even when collapsing.
⚠
warning
Avoid using breadcrumbs as the primary navigation. They are a supplementary pattern — users should still be able to reach any page from the main navigation. Breadcrumbs shine in deep hierarchies like e-commerce categories, documentation sites, and file systems.
Best Practices
Use aria-label="Breadcrumb" on the nav element to distinguish it from primary navigation.
Mark the current page with aria-current="page" and make it visually distinct (bold, different color).
Keep the root link visible even when collapsing middle items with ellipsis.
Use semantic <ol> instead of <div> to convey ordering information.
Ensure touch targets are at least 44×44px on mobile for each breadcrumb link.
Truncate long labels with ellipsis rather than letting them overflow the container.
Sync breadcrumb links with the URL structure so deep links work correctly.