JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test"></div>
CSS
#test{
width:200px;
height:200px;
}
.test1{
width:50px;
height:50px;
background:white;
border:1px solid blue;
}
JavaScript
$("#test").append($("<canvas/>",{"height":100,"width":100,"class":"test1"}));
$("#test").append($("<canvas/>",{"class":"test1"}).attr({"height":100,"width":100}));