Hi,
see the best and simple method to create a div might be like below:
function createDiv(obj1, obj2, obj3, obj4) {
var newDiv = '<div id="test1" style="height:'+obj1+';width:'+obj2+';color:'+obj3+';">rakesh</div>'
$('#obj4').append(newDiv);
}
here i have passed the four paremeters which are height,width,color and another div or page id where i have to add this newly created div.
i hope it might help.