What are Bootstrap 4 navs?
Overview
Navigation is used in Bootstrap to share general markup and styles by using base class base.nav. The base components in navigation are built with flexbox which helps to make multiple types of navigation components.
Syntax
The syntax is shown below:
<nav ”>
<a ”href=” “></a>
</nav>
Nav menu
Aligned nav: Nav can be aligned by using justify-content class either horizontally or vertically.Base nav: It provides a strong foundation for all types of navigation components and its component does not have an active state.Tabs: It create tabs in the navigation bar by using the .nav-tab class.Pills: Navs can be turned into pills by using the .nav-pills class.
Code
All navs have different nav-items. In code, different types of navs are used like:
Base navAligned nav(Horizontal/vertical)TabsPills
Code
Let’s look at the code below:
Explanation
In the above code, we create html file and add 4 navs in it.