Coding
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>My Portfolio</title>
<link rel="stylesheet" href="[Link]">
</head>
<body>
<!-- Header Section -->
<header>
<h1>Welcome to My Portfolio</h1>
<nav>
<ul>
<li><a href="#about">About Me</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<!-- About Section -->
<section id="about">
<h2>About Me</h2>
<p>Hello! I am Naveen, a passionate web developer. I
create interactive and responsive websites using modern
technologies.</p>
</section>
<!-- Projects Section -->
<section id="projects">
<h2>My Projects</h2>
<div class="project-container">
<div class="project-card">
<h3>Project 1</h3>
<p>A simple website built with HTML, CSS, and
JavaScript.</p>
</div>
<div class="project-card">
<h3>Project 2</h3>
<p>Portfolio website showcasing projects and
skills.</p>
</div>
<div class="project-card">
<h3>Project 3</h3>
<p>Interactive quiz app using JavaScript.</p>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact">
<h2>Contact Me</h2>
<form id="contactForm">
<input type="text" id="name" placeholder="Your
Name" required>
<input type="email" id="email" placeholder="Your
Email" required>
<textarea id="message" placeholder="Your Message"
required></textarea>
<button type="submit">Send Message</button>
</form>
<p id="status"></p>
</section>
<!-- Footer -->
<footer>
<p>© 2025 Naveen Raj. All rights reserved.</p>
</footer>
<script src="[Link]"></script>
</body>
</html>
CSS
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
line-height: 1.6;
background-color: #f0f2f5;
}
header {
background-color: #4CAF50;
color: white;
padding: 20px 0;
text-align: center;
}
nav ul {
list-style: none;
padding: 0;
}
nav ul li {
display: inline-block;
margin: 0 15px;
}
nav ul li a {
color: white;
text-decoration: none;
font-weight: bold;
}
section {
padding: 50px;
text-align: center;
}
.project-container {
display: flex;
justify-content: center;
gap: 20px;
flex-wrap: wrap;
}
.project-card {
background-color: white;
padding: 20px;
border-radius: 10px;
width: 250px;
box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}
form input, form textarea {
display: block;
width: 80%;
margin: 10px auto;
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
}
form button {
padding: 10px 20px;
border: none;
border-radius: 5px;
background-color: #4CAF50;
color: white;
cursor: pointer;
}
form button:hover {
background-color: #45a049;
}
footer {
text-align: center;
padding: 20px;
background-color: #333;
color: white;
}
Java script
// Contact Form Submission
[Link]("contactForm").addEventListener("s
ubmit", function(event) {
[Link](); // Prevent page refresh
const name = [Link]("name").value;
const email = [Link]("email").value;
const message =
[Link]("message").value;
if(name && email && message) {
[Link]("status").textContent = `Thank
you, ${name}! Your message has been sent.`;
[Link]("contactForm").reset();
} else {
[Link]("status").textContent = "Please
fill in all fields.";
}
});
// Smooth Scrolling for Navigation Links
const links = [Link]("nav ul li a");
for (const link of links) {
[Link]("click", function(e) {
[Link]();
const target =
[Link]([Link]("href"));
[Link]({ behavior: "smooth" });
});
}