JSFiddle - React, Tailwind, and code Playground

CSS

.red{color:red};

JavaScript

var d = $("<div></div>").text("hello").addClass("red").css("text-transform","uppercase");
$("body").append(d);