Breadcrumb with Bootstrap 4 provides the current page's location within a navigation hierarchy that adds separators automatically.
Steps To Create bootstrap 4 breadcrumb :
<ol>
(ordered list) inside <nav>
.
.breadcrumb
to the <ol>
element base class.
.breadcrumb-item
to <li>
element base class.
active
,assign .active
to <li>
element base class also.
Example
General Syntax
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Breadcrumb Item 1</a></li>
</ol>
Source Code
<div class="container mt-4">
<nav aria-label="breadcrumb bg-light">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item"><a href="#">Design</a></li>
<li class="breadcrumb-item active" aria-current="page">Development</li>
</ol>
</nav>
</div>
Source Code: Output
Note:Here .active
is used to indicated current active page inside navigation hierarchy.
It is used to locate page position inside navigation hierarchy.