Latest web development tutorials

HTML DOM Node lastChild property

Elements Object Reference Element object

Examples

Returns the last child node of the document:

document.getElementById("myList").lastChild;

try it"

Definition and Usage

lastChild property returns the last child node of the document.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support lastChild property


grammar

node .lastChild

technical details

return value: Last child
DOM version Core Level 1 Node Object


Elements Object Reference Element object