The Document Object Model (DOM) is a programming interface for
web 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 interact with the page.
A web page is a document that can be either displayed in the
browser window or as the HTML source. In both cases, it is the
same document but the Document Object Model (DOM) representation
allows it to be manipulated. As an object-oriented
representation of the web page, it can be modified with a
scripting language such as JavaScript.
The Document Object Model (DOM) is a programming interface for web 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 interact with the page.
document.getElementById("board")
document.createElement("div")
document.removeChild("board")
document.appendChild(new)
Dom => Document object model.
//way to access html and css code through javascript.
//inside document we get all html(head,body=> h1,button,p)
document =>
document.title=> to get title of website
const header= document.getElementsByTagName('h2')
console.log(header) // get HTMLCOLLECTION of all h2 element