JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<a class="custom-underline" href="">This has a good underline</a> <br/>
<a class="standard-underline" href="">This has a standard underline</a> <br />
<a class="custom-underline inline" href="">This has a good underline but display inline removed top margin</a>
</div>
CSS
.custom-underline {
border-bottom: 2px solid red;
display: inline-block;
margin-top: 20px;
}
.standard-underline {
text-decoration: underline;
display: inline-block;
margin-top: 20px;
}
.inline {
display: inline;
}
.container {
width: 100px;
}
a {
text-decoration: none;
line-height: 29px;
font-size: 20px;
}