HTML DOM parentElement Property
HTML DOM parentElement Property
The parentElement property is used to return the parent element of the specified element. It is similar to parentNode property but the difference is that it will return NULL if parent node is not element node.
Syntax:-
Its syntax is:- node.parentElement
Return:-
Its return is:- parent element node of a node else null if has no parent