Document Object Model(DOM)

When it comes to design a site or a web page it plays a very important role, basically here we are talking about HTML DOM, with the help of this the javascript can interact with the HTML code and can find or change any element of HTML code. Let’s try to make it simpler, whenever any web page loads it creates a document object model, it has a tree-like structure and have nodes, every node has one parent and probably many children.

The Document Object Model (DOM) is the HTML and XML application development API. This determines the basic framework of the records and how the paper is obtained and exploited. The Document Object Model may be used in any programming language.


Java Script can change all the existing HTML elements and attributes of a page, all the CSS styles of the page and you can even add new ones. the HTML DOM is the standard of how to get, change, add, or delete HTML elements.

DOM and JavaScript

The DOM is not a programming language, but without it, the JavaScript language will have no concept or notion of web pages, HTML documents, XML documents, and their components ( e.g. elements). Each document element — the document as a whole, the heading, the column tables, the table headers, the text in the table cells — is part of the database object model for that column, so that they can all be accessed and controlled using the DOM and the JavaScript scripting language.

In the beginning, JavaScript and DOM were closely intertwined, but eventually, they evolved into separate entities. The output of the website is stored in the DOM and can be accessed and manipulated using JavaScript so that we can write this approximate equation:

API = DOM and JavaScript

The DOM was developed to be independent of any common programming language, allowing the conceptual representation of the text accessible from a single, coherent API. While we concentrate solely on JavaScript in this reference paper, DOM implementations can be designed for any language.

Accessing the DOM

You don’t have to do something different to continue using the DOM. Different browsers have different DOM implementations, and these implementations show varying degrees of compliance with the actual DOM standard (the subject we are trying to avoid in this documentation), but each web browser uses a document object model to make web pages accessible via JavaScript.

When you create a script–whether it’s inline in an <script> element or included in the web page through a script loading instruction–you can immediately begin using the API for the document or window elements to manipulate the document itself or to get at the children of that document, which are the various elements in the web page. As this is not a topic that can be covered at once.

So here I am concluding this. Hope you guys enjoy reading this!

Categories: News

Tagged as: , ,