I tried to create div using javascript, but struck up at one point. Here is the code.
<script type="text/javascript">
var mydiv = document.createElement("div");
mydiv.id = "div1";
mydiv.style.height = "200px";
mydiv.style.width = "200px";
mydiv.style.background-color = "red";
document.body.appendChild(mydiv);
Your help is highly obliged.
Thanks in advance