JSFiddle - React, Tailwind, and code Playground
HTML
<p id="element">Hello! world!</p>
JavaScript
Element.prototype.colorAdd = function(){
this.setAttribute("style", "color:red; border: 1px solid blue;")
}
var elem = document.getElementById("element");
elem.colorAdd()