Pages

DOM: Document Object Model

Document Object Model treats each HTML element as a node in a tree and arranges all of them in the form of a tree data structure . Elements are arranged just like nodes are arranged in a tree with parent-child relationship determined by the nesting of the elements . A document node forms the root of the tree .

Element nodes further consist of  attribute nodes such as <a> element can consist of href and rel attributes . DOM model helps in easily applying various properties to a particular element or a group of elements .