What is the DOM (Document Object Model)?
The DOM is a JavaScript representation of a Webpage.
It is your "JavaScript window" into the contents of a webpage. It is a collection of objects, that you can interact with via JavaScript.
The way this works is that Javascript takes all of the HTML and CSS that generates a webpage and converts EVERYTHING into objects, which can then be manipulated by the JavaScript.
More info: