October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Bootstrap Breadcrumbs: Copy the Example and Customize It

Add accessible Bootstrap breadcrumbs with copyable HTML, correct current-page markup, and practical separator options for CSS and Sass.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Bootstrap’s breadcrumb component to show a page’s location in your site hierarchy. The copyable example below follows the official Bootstrap v5.3 structure; replace its labels and URLs with your real pages, and make sure your project loads the matching Bootstrap CSS.

Copy and adapt this Bootstrap breadcrumb

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="/">Home</a></li>
    <li class="breadcrumb-item"><a href="/library">Library</a></li>
    <li class="breadcrumb-item active" aria-current="page">Current page</li>
  </ol>
</nav>

This is an adaptation of the structure in Bootstrap’s v5.3 breadcrumb documentation. Each linked item represents an ancestor in the hierarchy; the final item identifies the page currently being viewed. Breadcrumbs supplement a site’s main navigation rather than replacing it.

As an Amazon Associate I earn from qualifying purchases.

How to add breadcrumbs in Bootstrap

  1. Confirm the framework version. Use markup and styling instructions that match the Bootstrap CSS version your project loads. The v5.3 example here should not be mixed blindly with older documentation such as Bootstrap v4.0 breadcrumbs.
  2. Place the component in a navigation landmark. Wrap the list in <nav> and give it a meaningful label, such as aria-label="breadcrumb".
  3. List the route hierarchy in order. Use an ordered list with .breadcrumb, and give each list item .breadcrumb-item. Link the ancestor pages to their actual site destinations.
  4. Mark the current page. Give the last item the active class and aria-current="page". Keep its visible label consistent with the page being viewed.

Bootstrap v5.3 also permits an unordered list. Its documented separators are generated with CSS rather than written between the list items.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Change or remove the breadcrumb separator

Bootstrap v5.3 uses a slash as the default divider. For a local text change, set the documented CSS custom property on the breadcrumb:

<nav aria-label="breadcrumb">
  <ol class="breadcrumb" style="--bs-breadcrumb-divider: '>';">
    <li class="breadcrumb-item"><a href="/">Home</a></li>
    <li class="breadcrumb-item active" aria-current="page">Current page</li>
  </ol>
</nav>

For a reusable stylesheet rule instead of an inline style, set the property in your CSS:

.breadcrumb {
  --bs-breadcrumb-divider: '>';
}

The documentation also shows an SVG divider and how to remove the divider by setting the custom property to an empty string. If you embed SVG data in a CSS custom property, reserved characters must be escaped or URL-encoded; Bootstrap’s Sass example uses its escape-svg() helper. See the v5.3 component reference for those forms.

Choose CSS or Sass for customization

Approach Use it when What it changes
CSS custom property You want a local divider adjustment without recompiling Bootstrap Sass. Set --bs-breadcrumb-divider on the breadcrumb.
Sass variable Your project already manages Bootstrap through Sass and needs a compiled theme setting. Change $breadcrumb-divider before compiling.

Bootstrap documents both methods; the right choice depends on how the project handles styles. The v5 migration notes explain that the divider custom property enables changes without recompiling CSS.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What changed in Bootstrap 5

Bootstrap’s v5 migration notes say the default breadcrumb appearance was simplified by removing padding, background color, and border radius. Those notes also document the divider custom property. The v4.0 reference describes the same broad navigation purpose, but its examples belong to that earlier version. The cited v5.3 documentation is version-specific and does not establish which Bootstrap release is newest today.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.