This code creates a navigation bar with a brand name on the left and links on the right. On small screens, the links hide and a menu button appears. The colors and spacing come from Tailwind CSS classes.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Simple Navigation Bar</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-100">
<nav class="flex items-center justify-between p-4 bg-indigo-700 text-white">
<div class="text-2xl font-bold">MyWebsite</div>
<ul class="hidden md:flex space-x-6">
<li><a href="#" class="hover:underline">Home</a></li>
<li><a href="#" class="hover:underline">Services</a></li>
<li><a href="#" class="hover:underline">About</a></li>
<li><a href="#" class="hover:underline">Contact</a></li>
</ul>
<button class="md:hidden" aria-label="Open menu">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
</nav>
</body>
</html>