User:Zuhui//Prototyping/Javascript
< User:Zuhui | | Prototyping
DOM
dev/understanding dom nodes - a comprehensive guide with example
What is Document Object Model
- DOM is a tree structure that browsers use to understand and represent a web page.
- in this tree, each element is called a node.
- Document Node: This is the top-level node in the DOM and represents the entire HTML document.
- Element Node: This represents an HTML element, such as
div
,p
,ul
, etc. - Attribute Node: This represents an attribute of an HTML element, such as
id
,class
,src
, etc. - Text Node: This represents the actual text within an HTML element
so "manipulating the DOM" means modifying or exploring this tree structure of the web page.