Hola
LhaN,
En realidad es así:
Código Texto:
Ver originalp
+-- texto: Un texto que tiene
+-- b
| +-- texto: negritas
+-- texto: y tambien tiene
+-- i
+-- texto: cursivas
Miralo tu mismo
Código HTML:
Ver original
<p>Un texto que tiene
<b>negritas
</b> y tambien tiene
<i>cursivas
</i></p>
var parrafo = document.body.getElementsByTagName('p')[0];
console.log(parrafo.firstChild); // Text: Un texto que tiene
console.log(parrafo.firstChild.nextSibling); // HTMLElement
console.log(parrafo.firstChild.nextSibling.nextSibling); // Text: y tambien tiene
console.log(parrafo.firstChild.nextSibling.nextSibling.nextSibling); // HTMLElement
Te recomiendo mucho
https://developer.mozilla.org/en/Gecko_DOM_Reference
Saludos!