What is the DOM?

If you’ve just started out with JavaScript, you might have seen tutorials use the acronym “DOM” and wondered what the hell it actually means. It stands for the Document Object Model, but it’s not as scary as it sounds.

The DOM is just a representation of the HTML document.

There’s a great explanation in the MDN Web Docs:

The Document Object Model (DOM) is a programming interface for HTML and XML documents. It represents the page so that programs can change the document structure, style, and content. The DOM represents the document as nodes and objects. That way, programming languages can connect to the page.

As a beginner, all you really need to know is that the DOM is what allows you to manipulate the page using JavaScript.

For more information, I recommend reading the full Introduction to the DOM in the MDN Web Docs 😊


If you have questions, feedback, or any other suggestions, please do email me. I'd love to hear from you!