Properties of DOM
Let’s see the properties of the document object that can be accessed and modified by the document object.
- 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.
- Document object: When an HTML document is loaded into a window, it becomes a document object. The ‘document’ object has various properties that refer to other objects which allow access to and modification of the content of the web page. If there is a need to access any element in an HTML page, we always start with accessing the ‘document’ object. Document object is property of window object.
- Form Object: It is represented by form tags.
- Link Object: It is represented by link tags.
- Anchor Object: It is represented by a href tags.
- Form Control Elements: Form can have many control elements such as text fields, buttons, radio buttons, checkboxes, etc.
HTML DOM (Document Object Model)
HTML DOM (Document Object Model) is a hierarchical representation of HTML documents. It defines the structure and properties of elements on a webpage, enabling JavaScript to dynamically access, manipulate, and update content, enhancing interactivity and functionality.
Note: It is called a Logical structure because DOM doesn’t specify any relationship between objects.
Table of Content
- Why DOM is required?
- Structure of DOM
- Properties of DOM
- Methods of Document Object Model
- What DOM is not?
- Levels of DOM: