Q&A Plateform

I need basic information as I am starting my career in web development

What is DOM in Javascript? How can you implement DOM in your website?provide a suitable example.

4 responds

Respond by student
Profile Icon Basant Adhikari

DOM stands for Document Object Model. It is a programming interface for HTML and XML documents and represents the structure of a web page or document as a tree-like model. The DOM allows programs and scripts to access and manipulate the content, structure, and style of a web page dynamically.

When a web page is loaded in a browser, the browser parses the HTML code and creates a hierarchical representation of the elements present in the page. This hierarchical representation is known as the DOM tree. Each HTML element (e.g., <div>, <p>, <a>, etc.) in the page becomes a node in the DOM tree, and attributes and text content are represented as properties of those nodes.


Respond by student
Profile Icon Susan Timalsina

this is answer from application


Respond by student
Profile Icon Susan Timalsina

this is answer from application


Respond by student
Profile Icon Susan Timalsina

answer


Contribute Your respond

Please login to contribute, click here to login Login