Document Object Model

DOM methods allow programmatic access to the tree; with them one can change the structure, style or content of a document.

In HTML DOM (Document Object Model), every element is a node:[4] The history of the Document Object Model is intertwined with the history of the "browser wars" of the late 1990s between Netscape Navigator and Microsoft Internet Explorer, as well as with that of JavaScript and JScript, the first scripting languages to be widely implemented in the JavaScript engines of web browsers.

Netscape's competitor, Microsoft, released Internet Explorer 3.0 the following year with a reimplementation of JavaScript called JScript.

Form, link and image elements could be referenced with a hierarchical name that began with the root document object.

The Legacy DOM enabled client-side form validation and simple interface interactivity like creating tooltips.

[6] In 2013, due to a lack of progress and the impending release of HTML5, the DOM Level 4 specification was reassigned to the HTML Working Group to expedite its completion.

To render a document such as a HTML page, most web browsers use an internal model similar to the DOM.

The DOM API provides a set of methods and properties to perform these operations, such as getElementById, createElement, appendChild, and innerHTML.Another way to create a DOM structure is using the innerHTML property to insert HTML code as a string, creating the elements and children in the process.

Creating a DOM structure does not necessarily mean that it will be displayed in the web page, it only exists in memory and should be appended to the document body or a specific container to be rendered.

Because the DOM supports navigation in any direction (e.g., parent and previous sibling) and allows for arbitrary modifications, implementations typically buffer the document.

And even before the idea of the DOM originated, there were implementations of equivalent structure with persistent disk representation and rapid access, for example DynaText's model disclosed in [15] and various database approaches.

Others, including Blink, WebKit, and Gecko, are shared by a number of browsers, such as Google Chrome, Opera, Safari, and Firefox.

WHATWG DOM