Drop-Down Menu Navbar

A Bootstrap dropdown menu navbar features navigation links that expand into dropdown menus when clicked, providing a compact and organized navigation structure for web applications.

Example: In this example creates a Bootstrap navbar with dropdown menus, providing compact navigation. Dropdowns expand on clicking parent items, enhancing navigation options and organization.

HTML
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" 
          content="width=device-width, initial-scale=1">
    <link rel="stylesheet" 
          href=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
    <script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
    </script>
    <script src=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js">
    </script>
</head>

<body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">
                    WebsiteName
                </a>
            </div>
            <ul class="nav navbar-nav">
                <li class="active">
                    <a href="#">Home</a>
                </li>
                <li class="dropdown">
                    <a class="dropdown-toggle" 
                       data-toggle="dropdown" 
                       href="#">
                        Page 1<span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Page 1-1</a></li>
                        <li><a href="#">Page 1-2</a></li>
                        <li><a href="#">Page 1-3</a></li>
                    </ul>
                </li>
                <li><a href="#">Page 2</a></li>
                <li><a href="#">Page 3</a></li>
            </ul>
        </div>
    </nav>
</body>

</html>

Output: 

Bootstrap Navigation Bar

Bootstrap Navigation Bar provides a responsive, customizable, and pre-styled navigation component for web applications. It incorporates features like branding, navigation links, dropdowns, and responsiveness, enabling developers to create effective and visually appealing navigation menus effortlessly.

Navbar: Bootstrap provides various types of navigation bars:

Navbar TypeDescription
Basic NavbarStandard navigation bar layout.
Inverted NavbarNavbar with inverted colors for a different look.
Coloured Navigation BarNavbar with customized colors for visual appeal.
Right-Aligned NavbarThe navbar is aligned to the right side of the page.
Fixed Navigation BarNavbar that remains fixed at the top of the page.
Drop-Down menu NavbarNavbar with drop-down menu options for navigation.
Collapsible NavbarNavbar with collapsible menu for space efficiency.

Similar Reads

Examples of Bootstrap Navigation Bar

Basic Navbar:...

Basic Navbar:

The basic navbar, styled with the navbar class, includes a logo, navigation links, and dropdown menus. It’s created using the

Inverted Navbar:

An inverted navbar is styled with dark colors and light text. It’s created using the navbar-inverse class in Bootstrap, providing a sleek and modern appearance for navigation menus....

Coloured navigation Bar :

A colored navigation bar is styled using custom CSS or Bootstrap classes to have a background color different from the default. It enhances visual appeal and branding consistency....

Right-Aligned Navbar:

A Bootstrap right-aligned navbar is created using the navbar-right class on the

Fixed Navigation Bar:

A Bootstrap fixed navigation bar remains visible at the top of the viewport while scrolling. It’s created using the navbar-fixed-top class for a persistent navigation experience....

Drop-Down Menu Navbar:

A Bootstrap dropdown menu navbar features navigation links that expand into dropdown menus when clicked, providing a compact and organized navigation structure for web applications....

Collapsible Navigation Bar:

A Bootstrap collapsible navigation bar collapses into a hamburger icon on smaller screens, conserving space. It expands to reveal navigation links when toggled, ensuring accessibility and responsiveness....