In this lecture, we introduce JavaScript events and the Document Object Model (DOM).
We explore how JavaScript can respond to user actions and make a web page interactive using querySelector() and addEventListener(). We also look at common events such as click, mouseover, input, submit, and keydown, as well as form handling with preventDefault().
The live coding example builds on the My Favourite Animal page and demonstrates a simple workflow: plan the user action → identify the event → update the page with JavaScript.
After watching the lecture, continue with Workshop 03 – JavaScript Events & DOM.