HTML DOM nextSiblingProperty
Examples
Returns the node immediately following an element:
document.getElementById("item1").nextSibling;
Try it Yourself »
Definition and Usage
The nextSibling property returns the node immediately following an element (at the same tree level).
The returned node is returned as a node object.
Note:If there is no node immediately following the element, it returns null.null.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the nextSibling property.
Syntax
node.nextSibling
Technical Details
| Return Value: | The node immediately following the node, as a node object. |
|---|---|
| DOM Version | Core Level 1 Node Object |
Other Extensions
Element Object