All cars are vehicles, but not all vehicles are cars. All thumbs are fingers, but not all fingers are thumbs. All Jacuzzis are hot tubs, but not all hot tubs are Jacuzzis. In the same vein, all HTML elements are nodes, but not all nodes are HTML elements.
Everything available to the
Node interface is also available to the
Element interface, but this doesn't work both ways.
I higlighted this recently when I wrote about the difference between the
nodeName property considers all types of node, whereas the
tagName property only considers
But they're still types of node.
tagName properties will be
nodeName properties will be