The DOM enables programmatic access to the HTML document structure for reading or modification purposes through an API. When we write code like
We can traverse our entire HTML document looking for specific HTML elements, which are called nodes, in the DOM. We can even create and append new elements to the DOM.
In browser scripts, the
document object is actually a property of the
window.document.body is the same as typing
document.body. The DOM starts at the
open() functions. These are just methods of the