Course Content
Bootstrap 5 Alerts
0/1
Progress Bars
0/1
Spinners
0/1
Pagination
0/1
List Groups
0/1
Bootstrap 5 Scrollspy
0/1
Bootstrap
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: