Got it! Here's a basic website using HTML and CSS. It includes a Home, About, and Contact section, all on a single page. You can copy this code into a .html
file and open it in your browser:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My Simple Website</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #007bff;
color: white;
padding: 20px;
text-align: center;
}
nav {
background: #f4f4f4;
padding: 10px;
text-align: center;
}
nav a {
margin: 0 15px;
text-decoration: none;
color: #007bff;
font-weight: bold;
}
section {
padding: 40px;
}
footer {
background-color: #333;
color: white;
text-align: center;
padding: 20px;
}
</style>
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
</header>
<nav>
<a href="#home">Home</a>
<a href="#about">About</a>
<a href="#contact">Contact</a>
</nav>
<section id="home">
<h2>Home</h2>
<p>This is the homepage of your new website. You can put any content here.</p>
</section>
<section id="about">
<h2>About</h2>
<p>This section tells visitors about you or your project.</p>
</section>
<section id="contact">
<h2>Contact</h2>
<p>Email: example@example.com</p>
</section>
<footer>
<p>© 2025 My Simple Website</p>
</footer>
</body>
</html>
Would you like to turn this into a more advanced version with JavaScript, animations, or a backend?
Comments
Post a Comment