Introduction to the DOM
The Document Object Model (DOM) is a programming interface created natively by the browser for your Web Pages. It represents your HTML document as a structured tree of objects so that JavaScript can safely interact with it.
Selecting and Manipulating Elements
To change an element on the screen, JavaScript must first select it from the DOM tree. The globally available document object gives us the methods to do so.
JavaScript Events
Interactivity on the web is driven by Events. An event is simply a signal triggered by the browser that something has happened—a user clicked a button, scrolled, typed into an input, or the page finished loading.