Skip to content

DOM & Events in JavaScript

DOM = Document Object Model

Document: Root of all objects on a webpage. To access an html element, you always start from document.

document.body.innerHTML = "Some text";

HTML DOM example