JSFiddle - React, Tailwind, and code Playground

JavaScript

Element.prototype.appendTo = function (other) {
	return other.appendChild(this);
};

let container = document.createElement('div');
container.style.padding = `10px`;
container.style.background = `green`;
container.appendTo(document.body);

let a = document.createElement('div');
a.style.minHeight = `100px`;
a.style.height = `30px`;
a.style.background = `red`;
a.appendTo(container);

let b = document.createElement('div');
b.style.marginTop = `10px`;
b.style.height = `30px`;
b.style.background = `yellow`;
b.appendTo(container);

let c = document.createElement('div');
c.style.marginTop = `10px`;
c.style.height = `30px`;
c.style.background = `blue`;
c.appendTo(container);