Website
Website
------------------------------------------
HTML:
----------
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Personal Portfolio</title>
</head>
<body>
<nav>
<ul class="nav-links">
<li><a href="#about">About</a></li>
<li><a href="#skills">Skills</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<header>
<h1>Welcome to My Portfolio</h1>
</header>
<section id="about">
<h2>About Me</h2>
<div class="about-content">
</div>
</section>
<section id="skills">
<h2>Skills</h2>
<ul class="skills-list">
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
</section>
<section id="projects">
<h2>Projects</h2>
<div class="project">
<h3>Project Title</h3>
<p>Project description</p>
<a href="project-demo.html">Live Demo</a>
</div>
</section>
<section id="contact">
<h2>Contact Me</h2>
<form id="contact-form">
<label for="name">Name:</label>
<label for="email">Email:</label>
<label for="message">Message:</label>
</form>
</section>
<footer>
</footer>
</body>
</html>
styles.css
----------------
body {
margin: 0;
padding: 0;
/* Navigation Bar */
nav {
background-color: #333;
color: #fff;
padding: 20px;
.logo {
font-size: 24px;
font-weight: bold;
margin-right: 20px;
.nav-links {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
.nav-links li {
margin-right: 20px;
.nav-links li a {
color: #fff;
text-decoration: none;
/* Hero Section */
header {
background-color: #f2f2f2;
padding: 50px;
text-align: center;
/* About Me Section */
#about {
padding: 50px;
text-align: center;
}
/* Skills Section */
#skills {
padding: 50px;
background-color: #f2f2f2;
text-align: center;
.skills-list {
list-style-type: none;
padding: 0;
.skills-list li {
display: inline-block;
margin: 0 10px;
/* Projects Section */
#projects {
padding: 50px;
text-align: center;
}
.project {
margin-bottom: 20px;
.project a {
display: block;
margin-top: 10px;
/* Contact Section */
#contact {
padding: 50px;
text-align: center;
#contact-form {
display: flex;
flex-direction: column;
align-items: center;
#contact-form label {
margin-bottom: 10px;
}
#contact-form input,
#contact-form textarea {
width: 100%;
padding: 10px;
margin-bottom: 10px;
box-sizing: border-box;
#contact-form button {
background-color: #333;
color: #fff;
border: none;
cursor: pointer;
/* Footer */
footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
script.js
-------------
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
e.preventDefault();
// You can add code here to handle form submission, such as sending an email or storing the data.
// For demonstration purposes, let's log the form data to the console.
this.reset();
});