Here's a single HTML file implementing a responsive car detail website using only HTML, Tailwind CSS, and JavaScript. It includes:
- Image and price
- Specs section with icons and simple progress bars
- Gallery with images and videos
- Reviews (dummy testimonials)
- Competitor comparison with pros and cons
✅ Tailwind CSS is included with <script src="https://cdn.tailwindcss.com"></script> in the <head>
✅ COPY-PASTEABLE HTML FILE:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Car Details - Tesla Model S Plaid</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#3b82f6',
},
},
},
}
</script>
</head>
<body class="bg-gray-100 text-gray-800">
<!-- Hero Section -->
<header class="bg-white shadow">
<div class="max-w-7xl mx-auto px-4 py-6 flex flex-col md:flex-row items-center">
<img src="https://placehold.co/1200x600/3b82f6/ffffff?text=2023+Tesla+Model+S+Plaid" alt="Tesla" class="w-full md:w-1/2 rounded">
<div class="mt-6 md:mt-0 md:ml-10">
<h1 class="text-3xl font-bold text-gray-900 mb-2">2023 Tesla Model S Plaid</h1>
<p class="text-xl text-primary font-semibold">$89,990</p>
<p class="mt-4 text-gray-700">The Tesla Model S Plaid sets a new standard in electric performance with jaw-dropping acceleration and futuristic tech.</p>
</div>
</div>
</header>
<!-- Specs Section -->
<section class="bg-white py-12">
<div class="max-w-5xl mx-auto px-4">
<h2 class="text-2xl font-bold mb-6 text-center">Specifications</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<div>
<div class="flex items-center mb-2">
<span class="text-primary mr-2">⚡</span>
<p class="font-medium">0-60 mph: <strong>1.99 sec</strong></p>
</div>
<div class="w-full bg-gray-200 rounded-full h-3 mb-4">
<div class="bg-primary h-3 rounded-full" style="width: 95%"></div>
</div>
<div class="flex items-center mb-2">
<span class="text-primary mr-2">🔋</span>
<p class="font-medium">Range: <strong>396 miles</strong></p>
</div>
<div class="w-full bg-gray-200 rounded-full h-3 mb-4">
<div class="bg-primary h-3 rounded-full" style="width: 80%"></div>
</div>
<div class="flex items-center mb-2">
<span class="text-primary mr-2">🚗</span>
<p class="font-medium">Top Speed: <strong>200 mph</strong></p>
</div>
<div class="w-full bg-gray-200 rounded-full h-3 mb-4">
<div class="bg-primary h-3 rounded-full" style="width: 90%"></div>
</div>
</div>
<div>
<div class="flex items-center mb-2">
<span class="text-primary mr-2">🧠</span>
<p class="font-medium">Autopilot</p>
</div>
<p class="text-sm text-gray-600 mb-4">Full Self Driving capability with AI enhancements.</p>
<div class="flex items-center mb-2">
<span class="text-primary mr-2">🪑</span>
<p class="font-medium">Interior</p>
</div>
<p class="text-sm text-gray-600 mb-4">Minimalistic design with a 17” cinematic display and yoke steering.</p>
</div>
</div>
</div>
</section>
<!-- Gallery -->
<section class="py-12 bg-gray-50">
<div class="max-w-5xl mx-auto px-4">
<h2 class="text-2xl font-bold mb-6 text-center">Gallery</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<img src="https://placehold.co/600x400/111/eee?text=Side+View" alt="Tesla Side" class="rounded shadow">
<img src="https://placehold.co/600x400/222/eee?text=Interior" alt="Interior" class="rounded shadow">
<div class="md:col-span-2">
<div class="aspect-w-16 aspect-h-9">
<iframe class="w-full h-64 rounded shadow" src="https://www.youtube.com/embed/dQw4w9WgXcQ" allowfullscreen></iframe>
</div>
</div>
</div>
</div>
</section>
<!-- Reviews -->
<section class="bg-white py-12">
<div class="max-w-5xl mx-auto px-4">
<h2 class="text-2xl font-bold mb-6 text-center">Customer Reviews</h2>
<div class="space-y-6">
<div class="bg-gray-100 p-4 rounded shadow">
<p class="italic">"Absolutely mind-blowing speed and futuristic interior. Love the yoke steering!"</p>
<p class="text-right text-sm text-gray-500 mt-2">- Alex J.</p>
</div>
<div class="bg-gray-100 p-4 rounded shadow">
<p class="italic">"Incredible range. Perfect for long road trips with autopilot doing most of the work."</p>
<p class="text-right text-sm text-gray-500 mt-2">- Samantha K.</p>
</div>
</div>
</div>
</section>
<!-- Competitor Comparison -->
<section class="py-12 bg-gray-50">
<div class="max-w-6xl mx-auto px-4">
<h2 class="text-2xl font-bold mb-6 text-center">Competitors</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Competitor 1 -->
<div class="bg-white p-6 rounded shadow">
<h3 class="text-xl font-semibold mb-2">Porsche Taycan Turbo S</h3>
<ul class="list-disc ml-6 text-green-600 mb-2">
<li>Superior handling</li>
<li>Premium interior</li>
</ul>
<ul class="list-disc ml-6 text-red-600">
<li>More expensive</li>
<li>Lower range than Tesla</li>
</ul>
</div>
<!-- Competitor 2 -->
<div class="bg-white p-6 rounded shadow">
<h3 class="text-xl font-semibold mb-2">Lucid Air Dream</h3>
<ul class="list-disc ml-6 text-green-600 mb-2">
<li>Longer range (520 miles)</li>
<li>Luxurious design</li>
</ul>
<ul class="list-disc ml-6 text-red-600">
<li>Less tech-focused UI</li>
<li>Higher pricing</li>
</ul>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-white text-center py-6 mt-12 border-t">
<p class="text-sm text-gray-500">© 2025 CarDetails. All rights reserved.</p>
</footer>
</body>
</html>
✅ Summary of Features:
- Tailwind CSS is used for styling layout & responsiveness.
- Hero section displays main image and price.
- Specs with icons and progress bars using simple visuals.
- Gallery includes images + embedded YouTube video.
- Reviews section styled testimonials.
- Competitor block with pros and cons using colored lists.
Let me know if you want this as a dynamic Single Page App (SPA) with tab switching, or with animations/interactions!