Bootstrap 5 is the latest major release by Bootstrap in which they have revamped the UI and made various changes. Breadcrumbs are used to indicate the current page’s location within a navigational hierarchy.
Bootstrap 5 Breadcrumb
- Breadcrumb Variables: It changes the default values provided for the breadcrumb by customizing SCSS file of Bootstrap 5.
- Breadcrumb Dividers: It customizes the bootstrap 5 breadcrumb divider, the –bs-breadcrumb-divider custom CSS property or the $breadcrumb-divider and $breadcrumb-divider-flipped Sass variables can be used.
Syntax:
<ol class="breadcrumb">
<li class="breadcrumb-item"> Content .. </li>
</ol>
Example 1: This example uses shows the working of Breadcrumbs in Bootstrap 5.
HTML
<!DOCTYPE html>
< html >
< head >
< title >
Bootstrap 5 Breadcrumbs
</ title >
< link rel = "stylesheet"
href =
integrity =
"sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
crossorigin = "anonymous" >
</ head >
< body class = "container" >
< div >
< h1 class = "text-success" >
GeeksforGeeks
</ h1 >
< strong >Bootstrap 5 Breadcrumb</ strong >
</ div >
< br >
< div >
< nav aria-label = "breadcrumb" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item active" >GeeksforGeeks</ li >
< li class = "breadcrumb-item" >HTML Tutorial</ li >
< li class = "breadcrumb-item" >CSS Tutorial</ li >
</ ol >
</ nav >
</ div >
</ body >
</ html >
|
Output:
Example 2: This example uses shows the working of Breadcrumbs in Bootstrap 5.
HTML
<!DOCTYPE html>
< html >
< head >
< title >
Bootstrap 5 Breadcrumbs
</ title >
< link rel = "stylesheet"
href =
integrity =
"sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
crossorigin = "anonymous" >
</ head >
< body >
< div style = "text-align: center;width: 600px;" >
< h1 style = "color: green;" >
GeeksforGeeks
</ h1 >
</ div >
< div style = "width: 600px;height: 200px;margin:20px;" >
< nav aria-label = "breadcrumb" >
< ol class = "breadcrumb" >
< li class = "breadcrumb-item" >
< a href = "#" >
GeeksforGeeks
</ a >
</ li >
< li class = "breadcrumb-item" >
Articles
</ li >
</ ol >
</ nav >
</ div >
</ body >
</ html >
|
Output:
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
24 Jan, 2023
Like Article
Save Article