Quantcast
Channel: What is DOM? (summary and importance) - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Answer by Saeed Hassanvand for What is DOM? (summary and importance)

$
0
0

When a browser loads an HTML page, its convert it to the Document Object Model (DOM).

The browser's produced HTML DOM, constructs as a tree that consists of all your HTML page element as objects. For example, assuming that you load below HTML page on a browser:

<!DOCTYPE html><html><head><title>website title</title></head><body><p id="js_paragraphId">I'm a paragraph</p><a href="http://somewebsite.com">some website</a></body></html>

After loading, the browser converts it to:

HTML DOM

Some of the ability of scripting languages on HTML DOM consists of:

1- Change all the HTML elements in the page.

2- change all the HTML attributes in the page.

3- Change all the CSS styles on the page.

4- Remove existing HTML elements and attributes.

5- Add new HTML elements and attributes.

6- React to all existing HTML events in the page.

7- create new HTML events on the page.

Let's back to your questions:

1- It currently used in all modern browsers.

2- Front-end developers.

3- All Front-end developers that using scripting languages especially JavaScript.


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>