Domain Object Model (DOM)

akhona

Akhona Mazingisa

Posted on May 6, 2024

Domain Object Model (DOM)

What is a Domain Object Model & how does it works:

Domain Object Model (DOM) is a programming interface for web documents, such as HTML. The DOM represents web pages with a structure where each web page is an object representing a part of the document, this allows the programming languages to interact with the page. The DOM represents a document with a logical tree-like structure. Each branch of the tree ends in a node, and each node contains objects.

The structure of DOM:

The DOM tree structure is made up of a root node, which is the document and a series of nodes that represent the elements, attributes, and text content of the document. This means that each node in the tree has a parent node, except for the root node, and can have multiple child nodes.

Image description

The DOM properties:

a. Window Object: Window Object is object of the browser which is always at top of the hierarchy. It is like an API that is used to set and access all the properties and methods of the browser. It is automatically created by the browser.

b. Document object: When an HTML document is loaded into a window, it becomes a document object.

c. Form Object: It is represented by form tags.

d. Link Object: It is represented by link tags.

e. Anchor Object: It is represented by a href tags.

f. Form Control Elements: Form can have many control elements such as text fields, buttons, radio buttons, checkboxes, etc.

💖 💪 🙅 🚩
akhona
Akhona Mazingisa

Posted on May 6, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related