title: How do I create a DOM node with text which contains HTML tags within it
body: <p>In the following code, the <code>CreateTextNode</code> function does not use the HTML tags contained in the <code>text</code> variable. Instead, it displays the raw HTML text in the result.</p>
  
  <pre><code>var i,text;
  for(i=0;i&lt;p.length;i++){
      text+=p[i].name+"&lt;br&gt;"+p[i].id+"&lt;br&gt;"+p[i].image;   
      //text contain embedded HTML tag.   
  
  }
  
  var para=document.createElement("p");
  var node=document.createTextNode(text);
  
  para.appendChild(node);
  var element=document.getElementById("one");
  element.appendChild(para);
  </code></pre>