About Lesson
Introduction to Bootstrap 5 Navs
- .nav → Creates a navigation container
- .nav-item → Defines each navigation item
- .nav-link → Defines a clickable navigation link
- .active → Highlights the active link
- .disabled → Disables a link
Example: Basic Navigation
HTML
<ul class="nav">
<li class="nav-item">
<a class="nav-link active" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">Disabled</a>
</li>
</ul>
Explanation:
- .nav creates a horizontal navigation.
- .active highlights the selected link.
- .disabled makes a link unclickable.
Output:
