This page uses Flexbox with Tailwind to create a header with spaced navigation links, a centered box, and a row of colored squares that wrap on smaller screens.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Flexbox Example</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-50 p-6">
<header class="flex justify-between items-center bg-white p-4 shadow">
<h1 class="text-xl font-bold">My Website</h1>
<nav class="flex space-x-4">
<a href="#" class="text-blue-600 hover:underline">Home</a>
<a href="#" class="text-blue-600 hover:underline">About</a>
<a href="#" class="text-blue-600 hover:underline">Contact</a>
</nav>
</header>
<main class="flex flex-col items-center mt-10 gap-6">
<section class="flex justify-center items-center w-64 h-40 bg-blue-100 rounded">
<p class="text-center">Centered Box</p>
</section>
<section class="flex flex-wrap gap-4 max-w-md">
<div class="w-24 h-24 bg-red-400 rounded"></div>
<div class="w-24 h-24 bg-green-400 rounded"></div>
<div class="w-24 h-24 bg-yellow-400 rounded"></div>
<div class="w-24 h-24 bg-purple-400 rounded"></div>
</section>
</main>
</body>
</html>