JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<label class="fine">
<span>LABEL NAME |</span>
<strong>ERROR MESSAGE</strong><!--innerHTML changed by JS-->
</label>
</form>
CSS
form label.fine{
display: block;
position: relative;
background-color: #212121;
color: #fff;
font-size: 0.8em;
padding:0.5em 0.5em;
border-bottom:1px solid #ff2222;
border-radius:0.2em 0.2em 0.2em 0.2em;
}
form label.fine span,
form label.fine strong
{
display: inline-block;
vertical-align: baseline;
}
form label.fine strong
{
font-size: 0.6em;
color:#ff2222; //changed by JS
text-decoration:bold;
}