<!DOCTYPE html>
<html lang="en" dir="ltr" style="style.css">
<!-- All icons were courtesy of FlatIcon : www.flaticon.com and FreePik : www.freepik.com -->
<head>
<meta charset="utf-8">
<title>CVV</title>
<!-- Bootstrap added to the project -->
<link rel="stylesheet" href="Resources/bootstrap-5.1.0-dist/css/bootstrap.css">
<link rel="script" href="Resources/bootstrap-5.1.0-dist/js/bootstrap.js">
<!-- Fonts from fonts.google.com -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Signika+Negative&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/styles.css">
<link rel="icon" href="Resources/icon.png">
<!-- "Icon made by Freepik from www.flaticon.com" -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="index.html">
<img src="Resources/binary-code.png" alt="binary-code-img" height="20px" width="20px;">
Coder
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#projectsButton"
aria-controls="projectsButton" aria-expanded="false" aria-label="Dropdown Navigation">
<span class="navbar-toggler-icon"></span>
</button>
<ul class="navbar-nav ms-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="" id="projectsButton" role="button"
data-target="dropdown" aria-expanded="false">
Projects
</a>
<ul class="dropdown-menu" aria-labelledby="projectsButton">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">Support</a>
</li>
<li class="nav-item">
<a class="nav-link" href="">Help</a>
</li>
</ul>
</nav>
</head>
This is my attempt at implementing a Bootstrap 5 dropdown button in the given code. However, clicking on the toggle button just refreshes the webpage instead of showing the dropdown menu.
The rest of the navigation bar elements are functioning correctly, including the brand element which redirects to the home page as expected.