The simple code for your portfolio website

Code Box with Copy Button
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>My Portfolio</title>
  <link rel="stylesheet" href="style.css">
<style>
/* Reset default margins */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Basic body styling */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

/* Container to center content */
.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}

/* Header styling */
header {
  background: #333;
  color: #fff;
  padding: 20px 0;
}

header h1 {
  text-align: center;
  margin-bottom: 10px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
}

nav a:hover {
  text-decoration: underline;
}

/* Section styling */
section {
  padding: 60px 0;
  text-align: center;
  background: #fff;
  margin-bottom: 20px;
  border-radius: 8px;
}

section h2 {
  margin-bottom: 20px;
  font-size: 28px;
  color: #333;
}

section p {
  margin-bottom: 20px;
  font-size: 18px;
}

section img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
}

/* Footer styling */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  section {
    padding: 40px 10px;
  }
}
</style>
</head>
<body>

<!-- Header -->
<header>
  <div class="container">
    <h1>My Portfolio</h1>
    <nav>
      <ul>
        <li><a href="#about">About</a></li>
        <li><a href="#projects">Projects</a></li>
        <li><a href="#contact">Contact</a></li>
      </ul>
    </nav>
  </div>
</header>

<!-- About Section -->
<section id="about">
  <div class="container">
    <h2>About Me</h2>
    <p>Hello! I'm a passionate web developer. I create beautiful and functional websites. This is a placeholder text for the About Me section.</p>
    <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQiGLE-YI5q9dh9sw6bGYADRxJyGwV8GuSjeA&s" alt="About Me Image">
  </div>
</section>

<!-- Projects Section -->
<section id="projects">
  <div class="container">
    <h2>My Projects</h2>
    <p>Here are some of the projects I've worked on. This is a placeholder text for the Projects section.</p>
    <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQB1Tl3Tip2TFV8jblrPbO3-LOiErvB95Bf1RV-uLAB6X38d0oCKrPDCuRd&s=10" alt="Project Image">
  </div>
</section>

<!-- Contact Section -->
<section id="contact">
  <div class="container">
    <h2>Contact Me</h2>
    <p>Feel free to reach out for collaborations or just a friendly hello!</p>
    <img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRDEsCgH4uJkUwed6G7QuOFrB3W8LNA_PSovP5asLul2OR7uYwmjxRnOxAF&s=10" alt="Contact Image">
  </div>
</section>

<!-- Footer -->
<footer>
  <div class="container">
    <p>© 2025 My Portfolio. All rights reserved.</p>
  </div>
</footer>

</body>
</html>