I attempted to create a navigation bar using the navbar instructions in Bootstrap 5. I included a Toggle hamburger Menu and linked it to the list that should be displayed. However, when I decrease the screen size, the Toggle feature does not function as expected.
Below is the code I used. Could you please help me identify the issue?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- Bootstrap CSS -->
<link
href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4a2825253e393e382b3a0a7f647a64">[email protected]</a>/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>NavBar</title>
<link rel="stylesheet" href="css/styles.css" />
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">NavBar</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collpase" data-bs-target="#navbarSupportedContent">
<span class="navbar-toggler-icon"></span>
</button>
<!-- menu items -->
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item">
<a href="#" class="nav-link active">Home</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link">Explore</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Add scripts needed for bootstrap to work -->
<script
src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a1c2cfcfc4c3c4c7d7d6ffe0abd0a1d0f4b1d0e1eff1a2b7f2a7d1f7d9d0c7d9d0c3">[email protected]</a>/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"
>
</script>
</body>
</html>
I attempted to integrate a toggle button in the navbar using Bootstrap, but I am facing difficulties in making the button functional