JSFiddle - React, Tailwind, and code Playground

by blog Canonium

HTML

<label class="form-required">
  <span>Last Name</span>
  <input type="text" name="lastname">
</label>

CSS

.form-required > span:after {
    content: " * ";
    color: red;
}