1

Is an Element an instance of a Node in HTML?

I presume Attributes are also Nodes and that "the Elements" is the set of Nodes that can be defined using the angle-bracket syntax?

Ben Aston
  • 53,718
  • 65
  • 205
  • 331
  • "An XML element is everything from (including) the element's start tag to (including) the element's end tag." – Anthony Nov 11 '15 at 14:30

2 Answers2

3

Properties

Inherits properties from its parents Node, and its own parent, EventTarget, and implements those of ParentNode, ChildNode, NonDocumentTypeChildNode, and Animatable.

https://developer.mozilla.org/en-US/docs/Web/API/Element

MartyIX
  • 27,828
  • 29
  • 136
  • 207
3

Yes it is a Node, according to the MDN documentation for HTMLElement :

Inherits properties from its parents Node, and its own parent, EventTarget, and implements those of ParentNode, ChildNode, NonDocumentTypeChildNode, and Animatable.

If that's a bit hard to find in text, MDN also provides an "Inheritance section" in the left sidebar.

MDN sidebar

ryanyuyu
  • 6,366
  • 10
  • 48
  • 53