how to add element within an element in html
<p>i need to add a element div and within that div i need to add a label element how to do that.....??</p>

<pre><code>var dd=document.getElementById("sample");
var d=document.createElement("div");
d.id="s";
d.innerHTML="welcome"
dd.appendChild(d);
var e=document.createElement("label");
e.innerHTML="success";
var f=dd.getElementById("div");
f.appendChild(e);
</code></pre>

<p>i have a div element sample in html..<code>&lt;div id="sample"&gt;&lt;/div&gt;</code> within that div element i add another div element with id "s" then i need to a label within the div id="s" how to do that????????</p>
