Using JavaScript create a div and also it will come top of the main div
<p>This is my HTML template.</p>

<pre><code>&lt;div id='main'&gt;
  &lt;div id='1'&gt;one&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>I want dynamically create a new div with inside of main div and also it (new div>) will come to top of the main div. The answer look likes</p>

<pre><code>&lt;div id='main'&gt;
  &lt;div id='new'&gt;new&lt;/div&gt;
  &lt;div id='1'&gt;one&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>How can this be achieved?</p>
