Generate me a webpage for Sri Lanka
- User
Generate me a webpage for Sri Lanka
Assistant
Generate me a webpage for Sri Lanka
Here's a simple HTML/CSS template for a Sri Lanka Travel Website. You can customize it further with dynamic features or integrate it with a backend as needed.
index.html):<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Discover Sri Lanka 🇱🇰</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;500;700&display=swap" rel="stylesheet">
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Roboto', sans-serif;
line-height: 1.6;
background: #f9f9f9;
color: #333;
}
header {
background: url('https://images.unsplash.com/photo-1596507122833-3a259934a5c6') no-repeat center center/cover;
height: 100vh;
color: white;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 1rem;
}
header h1 {
font-size: 3rem;
text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
nav {
background: #003366;
color: white;
padding: 1rem;
text-align: center;
}
nav a {
color: white;
margin: 0 15px;
text-decoration: none;
font-weight: bold;
}
nav a:hover {
text-decoration: underline;
}
section {
padding: 2rem 10%;
}
.attractions, .culture, .travel-info {
display: flex;
flex-wrap: wrap;
gap: 2rem;
}
.card {
flex: 1 1 300px;
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.card img {
width: 100%;
height: 200px;
object-fit: cover;
}
.card-content {
padding: 1rem;
}
form {
display: flex;
flex-direction: column;
gap: 1rem;
}
input, textarea {
padding: 0.5rem;
border-radius: 4px;
border: 1px solid #ccc;
}
button {
background: #003366;
color: white;
padding: 0.7rem;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background: #0055a5;
}
footer {
background: #003366;
color: white;
text-align: center;
padding: 1rem;
margin-top: 2rem;
}
@media (max-width: 768px) {
header h1 {
font-size: 2rem;
}
.attractions, .culture, .travel-info {
flex-direction: column;
}
}
</style>
</head>
<body>
<!-- Header -->
<header>
<h1>Welcome to Sri Lanka 🇱🇰</h1>
<p>Explore the Pearl of the Indian Ocean</p>
</header>
<!-- Navigation -->
<nav>
<a href="#overview">Overview</a>
<a href="#attractions">Attractions</a>
<a href="#culture">Culture</a>
<a href="#travel">Travel Info</a>
<a href="#contact">Contact</a>
</nav>
<!-- Overview Section -->
<section id="overview">
<h2>About Sri Lanka</h2>
<p>Sri Lanka, a tropical island nation in South Asia, is known for its lush green landscapes, ancient ruins, beautiful beaches, and rich cultural heritage. From the bustling streets of Colombo to the serene tea plantations of the Hill Country, Sri Lanka offers something for every traveler.</p>
</section>
<!-- Attractions Section -->
<section id="attractions">
<h2>Popular Attractions</h2>
<div class="attractions">
<div class="card">
<img src="https://images.unsplash.com/photo-15895392760-126d1f7db0c3" alt="Sigiriya Rock Fortress">
<div class="card-content">
<h3>Sigiriya Rock Fortress</h3>
<p>A UNESCO World Heritage Site and one of Sri Lanka's most iconic landmarks.</p>
</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1596507122833-3a259934a5c6" alt="Adam's Peak">
<div class="card-content">
<h3>Adam's Peak</h3>
<p>A sacred mountain offering breathtaking sunrise views and spiritual significance.</p>
</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1588058243826-7e75f3b60e73" alt="Mirissa Beach">
<div class="card-content">
<h3>Mirissa Beach</h3>
<p>One of the best spots for whale watching and relaxing on golden sands.</p>
</div>
</div>
</div>
</section>
<!-- Culture Section -->
<section id="culture">
<h2>Culture & Traditions</h2>
<div class="culture">
<div class="card">
<img src="https://images.unsplash.com/photo-1573496359148-8d6a55c6a65c" alt="Traditional Dance">
<div class="card-content">
<h3>Traditional Dance</h3>
<p>Sri Lankan dance forms like Kandyan dance are vibrant and deeply rooted in folklore.</p>
</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1560696215-8c66c617d695" alt="Buddhist Temple">
<div class="card-content">
<h3>Religious Diversity</h3>
<p>Buddhism, Hinduism, Islam, and Christianity coexist peacefully in Sri Lanka.</p>
</div>
</div>
<div class="card">
<img src="https://images.unsplash.com/photo-1596507122833-3a259934a5c6" alt="Sri Lankan Food">
<div class="card-content">
<h3>Cuisine</h3>
<p>Try dishes like rice and curry, hoppers, and string hoppers for an authentic taste.</p>
</div>
</div>
</div>
</section>
<!-- Travel Info Section -->
<section id="travel">
<h2>Travel Information</h2>
<div class="travel-info">
<div class="card">
<div class="card-content">
<h3>Best Time to Visit</h3>
<p>December to March (dry season in the south) and April to September (dry season in the north).</p>
</div>
</div>
<div class="card">
<div class="card-content">
<h3>Visa</h3>
<p>Most visitors can apply for an Electronic Travel Authorization (ETA) online.</p>
</div>
</div>
<div class="card">
<div class="card-content">
<h3>Transport</h3>
<p>Use taxis, tuk-tuks, trains, or rent a scooter to explore the island.</p>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact">
<h2>Contact Us</h2>
<form action="#" method="post">
<input type="text" name="name" placeholder="Your Name" required />
<input type="email" name="email" placeholder="Your Email" required />
<textarea name="message" rows="5" placeholder="Your Message" required></textarea>
<button type="submit">Send Message</button>
</form>
</section>
<!-- Footer -->
<footer>
<p>© 2025 Sri Lanka Travel Guide. All rights reserved.</p>
</footer>
</body>
</html>
hotels.html, itinerary.html) as your site grows.Let me know if you want to add features like a map, booking system, or multilingual support! 🇱🇰