What is DOM? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is DOM?

What is DOM? Why is it used?

5th Jul 2019, 11:48 AM
Jasurbek Nishonov
Jasurbek Nishonov - avatar
2 Answers
+ 9
I think the DOM can be visualised as a tree structure.
5th Jul 2019, 1:32 PM
Sonic
Sonic - avatar
+ 5
Document Object Model. You write down a HTML document as just text, but if we want to interact with the document in javascript, to change some colors or make text fly across the screen, we will need a better representation than just text. The DOM is that. It allows us to `element.style.backround = "red";`
5th Jul 2019, 11:53 AM
Schindlabua
Schindlabua - avatar