We will keep everything organized in a single folder called week1-portfolio/.
week1-portfolio/
├─ index.html # Structure of the website
├─ styles.css # Styling and colors
└─ script.js # Interactive behaviorindex.html — The Website’s SkeletonThink of HTML as the blueprint of a house.
Rooms = Sections.
Walls = <div> or <section>.
Doors = <a> links.
Let’s explore every line.
<!DOCTYPE html>👉 Tells the browser this is an HTML5 document. Without this, older browsers may behave weirdly.
<html lang="en">👉 Starts the webpage, language is set to English.
<head> Section – Metadata & ImportsThis is like the “invisible brain” of your site.
<head>
<meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>My Portfolio</title> <link rel="stylesheet" href="styles.css" />
</head><body> Section – Visible ContentThis is what people see on screen.
<header class="container">
<nav class="nav">
<a href="#about">About</a>
<a href="#skills">Skills</a>
<a href="#projects">Projects</a>
<a href="#contact">Contact</a>
</nav><nav>: Navigation bar. <h1>Hello, I'm <span class="accent">Your Name</span></h1> <p>Aspiring developer | Tech Enthusiast | Lifelong Learner</p> <button id="themeBtn">Toggle Theme</button>
</header><main class="container">The main “body” where all sections go.
<section id="about">
<h2>About Me</h2>
<p>I am a fresher learning web and Python. This is my first portfolio.</p>
</section>id="about" lets the nav link scroll here.<section id="skills">
<h2>Skills</h2>
<ul class="tags">
<li>HTML</li><li>CSS</li><li>JavaScript</li><li>Python</li>
</ul>
</section><ul> = unordered list. <li> = list items.<section id="projects">
<h2>Projects</h2>
<article class="card">
<h3>Portfolio Website</h3>
<p>A responsive personal website built with HTML/CSS/JS.</p>
<a href="#" target="_blank">View</a>
</article>
</section>target="_blank" opens link in a new tab.<section id="contact">
<h2>Contact</h2>
<form id="contactForm">
<label>
Name
<input name="name" required />
</label>required ensures user must fill it. <button type="submit">Send</button>
<p id="formMsg" class="muted"></p>
</form>
</section><p id="formMsg"> shows feedback like “Thanks!”.<footer class="container muted">© 2025 Your Name</footer>
<script src="script.js"></script>
</body>
</html>styles.css — Dressing Up the WebsiteThink of CSS as painting, decorating, and arranging furniture.
:root { --bg:#0f172a; --fg:#e2e8f0; --accent:#38bdf8; --card:#111827; }--bg = background color, --fg = foreground (text).* { box-sizing: border-box; }body { margin:0; font-family: system-ui; background:var(--bg); color:var(--fg); }.container { width:min(1000px, 92%); margin-inline:auto; padding:1.5rem 0; }.nav { display:flex; gap:1rem; flex-wrap:wrap; }.tags li { background:#1f2937; padding:.4rem .7rem; border-radius:999px; }.card { background:var(--card); padding:1rem; border-radius:14px; box-shadow:0 4px 20px rgba(0,0,0,.2); }.light { --bg:#f8fafc; --fg:#0b1220; --card:#ffffff; }body gets class light, variables change = Light Mode.script.js — Adding InteractivityThink of JavaScript as the electricity in the house. It makes lights turn on (buttons work, forms respond).
const themeBtn = document.getElementById("themeBtn");
themeBtn.addEventListener("click", () =>
document.body.classList.toggle("light")
);id.light class on body.const form = document.getElementById("contactForm");
const msg = document.getElementById("formMsg");form.addEventListener("submit", (e) => {
e.preventDefault(); // Stop page refresh
const data = Object.fromEntries(new FormData(form).entries()); if (!data.name || !data.email || !data.message) {
msg.textContent = "Please fill all fields.";
return;
} msg.textContent = "Thanks! Your message was not really sent (demo).";
form.reset();
});index.html.index.html → “Go Live” → auto reload on save.You just:
👉 This is your first step toward becoming a web developer 🚀.
Perfect 👍 Let’s make a Weekly Assignment Sheet + Grading Rubric for Month 2 – Week 2: Static Website (Portfolio).
Topic: Build a Personal Portfolio Website (HTML + CSS + JS)
week1-portfolio/index.html, styles.css, script.js.<header> with navigation links (About, Skills, Projects, Contact).Add <main> with four sections:
Add <footer> with copyright.
.light theme for light mode.Implement form submission handling:
week1-portfolio/ as a .zip file.Share a short 2–3 minute screen recording:
Upload both to the internship portal.
| Criteria | Excellent (Full Marks) | Good (Partial Marks) | Needs Improvement |
|---|---|---|---|
| File Setup (10) | All files created & linked correctly | Minor linking mistake | Missing/incorrect setup |
| HTML Structure (25) | All 4 sections present, proper semantic tags used | Some sections incomplete/mis-tagged | Missing major sections |
| CSS Styling (25) | Consistent design, responsive, light/dark themes work | Basic styling but not responsive OR missing theme toggle | Very poor or no styling |
| JavaScript Interactivity (25) | Theme toggle + form validation + success message work smoothly | One feature missing/buggy | JS not working at all |
| Presentation (15) | Clean layout, correct details, personalized content | Minor issues in readability or details | Unclear, unpolished, or copy-paste content |
✅ Total Possible: 110 pts (100 base + 10 bonus) 💡 Passing score: 60 pts 🎖️ Certificate distinction: 90+ pts