DOM - Hierarchy

About

The nodes in the node tree have a hierarchical relationship to each other.

Merge with DOM - (Node) Tree

Definition

Precedence

An element A is said to be preceded or followed by a second element B if A and B have the same parent node and there are no other element nodes or Text nodes (other than DOM - Text (node)) between them.

Only Child

A node is the only child of an element if that element contains no other nodes other than:

Terms

The terms parent, child, and sibling are used to describe the relationships. Parent nodes have children. Children on the same level are called siblings (brothers or sisters).

  • In a node tree, the top node is called the root. In HTML, it's the html element
  • Every node, except the root, has exactly one parent node
  • A node can have any number of children
  • A leaf is a node with no children
  • Siblings are nodes with the same parent





Discover More
Domtree
DOM - (Node) Tree

The DOM presents an (XML|HTML) document as a tree-structure. A DOM has a standard tree structure, where each node contains one of the components from an XML structure. Generally, the vast majority of...
React

is a virtual dom technology that permits to create HTML page or components based on the concepts that: If the data (state) changes, the UI should change too. Learn once, write anywhere Babel for...



Share this page:
Follow us:
Task Runner