In the HTML DOM, everything is a node. The DOM is HTML viewed as a node tree.
According to the W3C HTML DOM standard, everything in an HTML document is a node:
The HTML DOM views HTML documents as tree structures. The structure is called a Node Tree:
The nodes in the node tree have a hierarchical relationship to each other.
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).
The following image illustrates a part of the node tree and the relationship between the nodes:
Look at the following HTML fragment:
From the HTML above:
A common error in DOM processing is to expect an element node to contain text.
In this example: <title>DOM Tutorial</title>, the element node <title>, holds a text node with the value "DOM Tutorial".
The value of the text node can be accessed by the node's innerHTML property.
You will read more about the innerHTML property in a later chapter.
The perfect solution for professionals who need to balance work, family, and career building.
More than 10 000 certificates already issued!
The HTML Certificate documents your knowledge of HTML.
The HTML5 Certificate documents your knowledge of advanced HTML5.
The CSS Certificate documents your knowledge of advanced CSS.
The jQuery Certificate documents your knowledge of jQuery.
The XML Certificate documents your knowledge of XML, XML DOM and XSLT.
The ASP Certificate documents your knowledge of ASP, SQL, and ADO.
The PHP Certificate documents your knowledge of PHP and SQL (MySQL).
Your message has been sent to W3Schools.