Making Things Interactive
Add buttons, counters, and dynamic behavior to your pages using JavaScript.
1What is JavaScript?
So far, your pages have been static -- they display content but nothing changes when you interact with them. JavaScript is what makes pages come alive. It is the “brain” that listens for clicks, updates text, hides and shows elements, and reacts to what the user does.
The Three Languages of the Web
HTML
The skeleton -- what content appears on the page
CSS
The skin -- how the content looks (colors, spacing, fonts)
JavaScript
The brain -- how the page behaves and reacts to users
When you vibe code interactive features, the AI combines all three. Your prompt might be “add a button that counts clicks” and the AI writes HTML (the button), CSS (how it looks), and JavaScript (what happens on click) all at once.