Return the first child node of the document:
The firstChild property returns the first child node of the specified node, as a Node object.
Read more about the Node object in our Node object reference.
Note: In HTML, the document itself is the parent node of the HTML element, HEAD and BODY are child nodes of the HTML element.
The firstChild property is supported in all major browsers.
|Return Value:||The first child of the node, as a Node object|
|DOM Version||Core Level 1|
Your message has been sent to W3Schools.