The DOM: The Breakdown ⚒
What is the Document Object Model (DOM)?
The Document Object Model (DOM) is an interface for web documents. A 🌳 (tree) of “node objects” that represents a webpage. These nodes allow access and change to the document. Think of the DOM like an upside down tree. The root is at the top.
Okay, but what does that really mean…?
When your HTML is written and viewed in the browser, an option for developers is being able to access the elements panel in the browser developers tools on any website.
Get courtney’s stories in your inbox
Join Medium for free to get updates from this writer.
You can:
- listen for clicks and scrolls
- add, move, remove elements, like text, images, etc.
- fetch new data
- and many more!
The Benefits of the DOM:
- it allows us to interface with the DOM via JavaScript
- the core concepts (events, elements and classes) transcend all different types of frameworks like React, Angular and Vue.
- you can change existing nodes
How Does the DOM Work?
You can access the DOM using JavaScript and DOM programming with two variables: Window and Document objects.
- Window Object: is an object with methods and properties attached to the DOM window.
- Document Object: is an object inside the window that allows us to manipulate the DOM.
While there are many other concepts to the DOM, after the completion of Phase 1 at Flatiron Schools, these were key takeaways during my learning. Feel free to correct anything! Thanks for reading :)








