Introduction
Breadcrumbs help users see where they are on a website. They show the path from the homepage to the current page.
Breadcrumbs help users see where they are on a website. They show the path from the homepage to the current page.
<nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item"><a href="#">Library</a></li> <li class="breadcrumb-item active" aria-current="page">Data</li> </ol> </nav>
<nav> with aria-label="breadcrumb" for accessibility.<li> has class active and aria-current="page" to show the current page.<nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item active" aria-current="page">Dashboard</li> </ol> </nav>
<nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item"><a href="#">Library</a></li> <li class="breadcrumb-item"><a href="#">Data</a></li> <li class="breadcrumb-item active" aria-current="page">Reports</li> </ol> </nav>
This example shows a breadcrumb navigation bar with three levels. The last item is the current page and is not a link.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Bootstrap Breadcrumb Example</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" /> </head> <body> <main class="container mt-4"> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="#">Home</a></li> <li class="breadcrumb-item"><a href="#">Library</a></li> <li class="breadcrumb-item active" aria-current="page">Data</li> </ol> </nav> </main> </body> </html>
Breadcrumbs improve navigation but should not replace main menus.
Always use aria-current="page" on the current breadcrumb for screen readers.
Bootstrap automatically styles breadcrumbs with spacing and separators.
Breadcrumbs show the user's location on a website.
Use Bootstrap's breadcrumb classes inside a <nav> for accessibility.
The current page breadcrumb has the active class and aria-current="page".
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item"><a href="#">Library</a></li>
<li class="breadcrumb-item active" aria-current="page">Data</li>
</ol>
</nav><nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item active"><a href="#">Home</a></li>
<li class="breadcrumb-item">Library</li>
</ol>
</nav>Pass the test and this pattern moves unknown