What is DOM?
Experience Level:
Junior
Tags:
HTML
Answer
DOM is the Document Object Model. It is an object-based representation of the source HTML document.
When the browser processes your HTML page, it creates a tree of tag objects. Each tag object represents one HTML tag.
The tag object contains all information about the tag - what is the tag name, what are the tag attributes, what is the content of the tag, what is the parent tag of the tag.
Except this, the tag object also has a reference to the parent tag object and all child tag objects. So that the tag objects are linked together and form a tree.
This tree can then easily be navigated. Thanks to it you can quickly find information about specific tag and its element and you can also change their properties.
Related HTML job interview questions
-
What is <figure> tag?
HTML Junior -
How does HTML/CSS work with DOM?
HTML Junior -
How do you create table with 2 rows and 3 cells?
HTML Junior -
What is <i> tag?
HTML Junior -
What is <strong> tag?
HTML Junior