Create three cards with blue background using Tailwind CSS
by qwerew0
HTML
<!doctype html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tailwind 레이아웃 실습</title>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
</head>
<body>
<nav class="flex items-center justify-between bg-gray-900 text-white p-4">
<span class="text-xl font-bold">MySite</span>
<div class="flex gap-6">
<a href="#">홈</a>
<a href="#">소개</a>
<a href="#">연락처</a>
</div>
</nav>
<h1 class="text-3xl font-bold text-blue-600">Tailwind 실습 시작</h1>
<div class="m-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 xl:grid-cols-4">
<div class="p-4 bg-blue-500 text-white rounded-lg">카드 1</div>
<div class="p-4 bg-blue-500 text-white rounded-lg">카드 2</div>
<div class="p-4 bg-blue-500 text-white rounded-lg">카드 3</div>
<div class="p-4 bg-blue-500 text-white rounded-lg">카드 4</div>
<div class="p-4 bg-blue-500 text-white rounded-lg">카드 5</div>
<div class="p-4 bg-blue-500 text-white rounded-lg">카드 6</div>
</div>
<footer class="flex justify-center bg-gray-900 text-white p-4">
<span>© 2026 MySite</span>
</footer>
</body>
</html>