<p id="P1">Hello World</p>
<p id="P2">Hello Baby</p>
document.getElementById("P1").nextsibling //return [object Text]
document.getElementById("P1").nextElementSibling //return [object HTMLParagraphElement]
Example by JS Bin
Node.nextSibling - MDN
Element.nextElementSibling - MDN