JSFiddle - React, Tailwind, and code Playground

by Ilhom Maksadkulov

HTML

<div id="div1"></div>
	<input type="button" onclick="createParagraph()" value="click">

JavaScript

function createParagraph() {

	var div1 = document.getElementById('div1');
	var pars = document.createElement('p');

	pars.innerHTML = 'Sometext';
	div1.appendChild(pars);

}