JSFiddle - React, Tailwind, and code Playground
by masbicudo
HTML
<hr class="separator" data-text="Line 2" />
CSS
.separator {
text-align: center;
height: 0.5em;
border: 0;
border-bottom: 2px solid black;
margin-bottom: 0.5em;
}
.separator:before {
content: " " attr(data-text) " ";
background-color: white;
color: black;
padding: 0 10px 0 10px;
}