Return the parentNode of an <li> element:
The parentNode property returns the parent node of the specified node, as a Node object.
Returns null if the the specified node does not have a parent node.
Read more about the Node object in our Node object reference.
![]()
The parentNode property is supported in all major browsers.
| Return Value: | The parent-node of a node, as a Node object |
|---|---|
| DOM Version | Core Level 1 |
Node Object
Your message has been sent to W3Schools.