JSFiddle - React, Tailwind, and code Playground
HTML
<div class="theorem" text='Prime numbers'>
All odd numbers are prime.</div>
CSS
.theorem {
display: block;
font-style: italic;
}
.theorem:before {
content: "Theorem. ";
font-weight: bold;
font-style: normal;
}
.theorem[text]:before {
content: "Theorem (" attr(text) ") ";
}