X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM parentNode Property

Element Object Reference Element Object

Example

Return the parentNode of an <li> element:

document.getElementById("item1").parentNode;

Try it yourself »


Definition and Usage

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.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The parentNode property is supported in all major browsers.


Syntax

node.parentNode

Technical Details

Return Value: The parent-node of a node, as a Node object
DOM Version Core Level 1 Node Object


Element Object Reference Element Object


Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook