Lesson 17 of 18

⚡ Portfolio — Part 2

🎯 Grades 9–12 ⏱ ~45 minutes 🔴 Project

What You'll Add

  • Dark mode toggle (saves preference to localStorage)
  • Smooth scroll and active nav highlighting on scroll
  • Contact form with JavaScript validation and success feedback
Quick Check

1. How do you make anchor links scroll smoothly?

AUsing JavaScript only
BAdding scroll-behavior: smooth to the html element
CAdding a transition to every section

2. Which Web API saves data that persists between browser sessions?

AsessionStorage
BlocalStorage
Cdocument.cookie

3. What CSS property keeps the nav bar at the top during scroll?

Aposition: fixed
Bposition: sticky; top: 0
Cposition: absolute; top: 0

4. What should you do after a successful form submission?

AReload the page
BShow a success message and call form.reset()
CHide the form element permanently