Document Object Model (DOM)

Jagadhiswaran D
2 min readJan 1, 2022

Document Object Model is a programming interface for Web documents Such as HTML and XML documents. DOM is used to represent the Webpage in a Hierarchical manner for the programmer to easily access the classes, elements ,attributes ,and IDs in the Web Document.

As many know DOM is Mostly Used through JavaScript . It can be used For any programming language. DOM is built using Multiple APIs That work together. The core DOM describes the documents and objects within it but the integration of Multiple APIs increased the capability of DOM.

HTML is used as a Structure of the webpages and JavaScript is added to give behavior to the structure. when HTML files loaded in the browser JavaScript does not understand the HTML file so DOM is created . DOM is Simple Representation of the same HTML document . JavaScript Understands DOM easily because It Represents in Objects. JavaScript cannot understand Tags like(Span , div , p )etc.. but when it enters the DOM it Will read as Object Span by different function.

DOM structure is basically as tree-like representation of a document. Window Object is the top of the hierarchy in the tree structure followed by Document Object and other Objects.

The DOM Does Not Define any Binary Description . DOM is not used to Define Objects in HTML and XML. DOM is not represented By data Structures.

DOM Contains FOUR Levels:

Level 0 : Low-level Interfaces

Level 1 : Core parts Of HTML And High-level Interfaces.

Level 2 : Views, Events, Styles, Actions, Traversal, Range and Extends Functionality of DOMlevel1.

Level 3 : Load, Save, Validation, XPath is used to access the DOM Tree And Extends Functionality the DOMLevel2.

--

--

Jagadhiswaran D

Front-end Developer | JavaScript Developer | Web Developer | Software Engineer | Blockchain Ethusiast | Web3.js | Ethereum |