nodeName is the attribute of the node, and tagName is the attribute of the element. Elements are subsets of nodes. Not any node has a tagName, such as a text node, which only has the nodeName attribute.
This is the same relationship between tilt and italics in css. Not all elements are italicized, but they can be tilted.
The above article briefly talks about JS tagNaem and nodeName is all the content I have shared with you. I hope you can give you a reference and I hope you can support Wulin.com more.