What is a node in Javascript?

A “node”, in this context, is simply an HTML element. The “DOM” is a tree structure that represents the HTML of the website, and every HTML element is a “node”. See Document Object Model (DOM).


More specifically, “Node” is an interface that is implemented by multiple other objects, including “document” and “element”. All objects implementing the “Node” interface can be treated similarly. The term “node” therefore (in the DOM context) means any object that implements the “Node” interface. Most commonly that is an element object representing an HTML element.

Leave a Comment

tech