Node

Every DOM type (except Window) implements the Node interface.

Properties
These properties are available on all Node instances.

firstChild
Returns the node's first child in the tree, or null if the node is childless. If the node is a Document, this returns the first node in the list of its direct children.

nextSibling
Returns the node immediately following the current one in the parent's childNodes list, or null if this is the last node in that list.

parentNode
A reference to the node's container/parent, if any.

Methods
These methods are available on all Node instances.

appendChild
Adds a node to the end of the list of children of a specified parent node. If the node already exists it is removed from its current parent node, then added to the new parent node.

insertBefore
Inserts newChild before refChild and returns newChild.

replaceChild
Replaces oldChild with newChild and returns oldChild.