Document
└── html
├── head
└── body
├── header
├── main
└── footer
// Access an element by its ID
const heading = document.getElementById("main-heading");
console.log(heading.textContent);
const paragraph = document.querySelector(".intro");
paragraph.textContent = "Welcome to Learn2Kode!";
The DOM is the backbone of interactive web pages. Understanding it is essential for any JavaScript developer, whether you are working with vanilla JS or modern frameworks.