Lesson 10 ยท the FINAL BOSS ๐Ÿ‘พ ยท about 60 minutes

๐Ÿ‘พ FINAL BOSS: Vibe Code With AI โ€” and Understand Every Line

This is the mission you started with: get an AI to build a landing page for your product, then prove you understand exactly what it wrote. Everything you learned was training for this fight.

๐ŸŽฌ Watch first (90 seconds)

The secret weapon you built

Most people who vibe code get stuck the moment something breaks, because the AI's code is a mystery box to them. Not you. You now know:

๐Ÿ’ก The one idea of this lesson Vibe coding is a conversation, not a slot machine. The loop is: ask clearly โ†’ read what the AI wrote โ†’ change something yourself โ†’ ask why. If you can't explain a line, you don't own your page โ€” the AI does.

โš”๏ธ Boss fight โ€” round 1: Ask like a pro

Open your AI (Claude!) and ask it to build a landing page. But a pro prompt beats "make me a website". A pro prompt says what, for whom, and what parts:

Build a landing page for my product "Robo Sneakers" โ€”
shoes for kids that tie themselves.

I want:
- a hero section with a big headline and a Buy button
- 3 feature cards side by side (use flexbox)
- a footer
- one HTML file only, with the CSS in a <style> tag
  and the JavaScript in a <script> tag
- when I click Buy, show a fun message

See what you did there? You just used the words hero, cards, flexbox, footer โ€” you speak the AI's language now. Save what it gives you as practice/ai-landing.html and open it in your browser.

๐Ÿ” Boss fight โ€” round 2: The Code Detective checklist

Now open the AI's code in VS Code and hunt for each of these. Tick them off โ€” for real, on paper or out loud:

  1. Find the skeleton: <!DOCTYPE html>, <head>, <body>. (Lesson 2)
  2. Find where the CSS lives and pick ONE rule. Say out loud: who does it select, what does it change? (Lesson 5)
  3. Find a box-model property โ€” padding, margin, or border-radius โ€” and predict what happens if you double it. Then do it. Were you right? (Lesson 6)
  4. Find the display: flex. Which element is the track, and which are the train cars? (Lesson 7)
  5. Find the JavaScript. Point to: where it finds the button, where it listens for the click, and what it changes. (Lesson 8)
  6. Find ONE thing you've never seen before. Ask the AI: "Explain this line like I'm 10." That question is a superpower โ€” use it forever.

๐Ÿ› ๏ธ Boss fight โ€” round 3: Take control

Prove the page is YOURS, not the AI's. Make these three changes by hand, without asking the AI:

  1. Change the hero background color.
  2. Add a 4th feature card (copy a card element, edit the words).
  3. Change what the Buy button says when clicked.
โš ๏ธ If a change does nothing You've seen this boss's tricks before! Check: did you save? Is a selector or id spelled EXACTLY the same in both places? Is a closing tag or } missing? These three catch 90% of all bugs โ€” even for grown-up engineers.

๐Ÿ•น๏ธ Can you read AI code? Prove it!

Below is a real chunk of AI-style code. Read it, then answer the quiz UNDER it. No running it โ€” just your eyes and your brain. This is the actual final exam.

<section class="hero">
  <h1>Mega Slime 3000</h1>
  <p>The only slime that glows in the dark.</p>
  <button id="order-btn">Order now</button>
  <p id="thanks"></p>
</section>

<style>
  .hero {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 60px;
  }
  #order-btn {
    background-color: gold;
    border: none;
    padding: 12px 24px;
    border-radius: 999px;
  }
</style>

<script>
  const btn = document.getElementById("order-btn");
  btn.addEventListener("click", function () {
    document.getElementById("thanks").textContent = "๐ŸŽ‰ Order received!";
  });
</script>

โœ๏ธ The last task: fix the AI's bug

AIs write bugs too! This AI code has one sneaky bug that makes the button do nothing. You've fixed this exact kind of bug before. Find it:

๐Ÿ† Did you win?

You beat the final boss if ALL of these are true:

If yes: you did it. That was the whole mission. Tell your teacher (me!) โ€” I'll write it into your learning records, and we'll pick your next adventure (publishing your page on the real internet? making it look good on phones? a game?).

๐Ÿ“š Want more?

โญ Best thing to read next MDN: Your first website โ€” you've now covered almost all of it. Skim it start to finish and enjoy how much you already understand. Then try Publishing your website to put your page on the real internet.