JSFiddle - React, Tailwind, and code Playground

by Blender

HTML

<div id="your-div"></div>

CSS

#your-div {
    position: relative;
    background: rgb(200, 200, 255);
    
    width: 500px;
    height: 500px;
}

JavaScript

$('<div />', {
    id: 'child',
    text: 'Hello'
}).css({
    position: 'absolute'
}).offset({
    top: Math.floor(Math.random() * 500),
    left: Math.floor(Math.random() * 500)
}).appendTo('#your-div');