I have a parent Element containing just one child element so as far as I know this parent element has one child node but in console there are three nodes two of them is text node. This is clear in this image.
Now my questions are:
1.Where does this text nodes come from?
Are these text node built in? What is the necessity of them?
What are the rules of them?
var container = document.getElementById('container');
var children = container.childNodes;
console.log(children);
<div id="container">
<div id='test'></div>
</div>