For cross-browsing it is better to use text-underline-offset
over the text-underline-position
, because text-underline-position
isn’t supported by iOS Safari
So use this answer: https://stackoverflow.com/a/63607426/1894907
#line{
text-decoration-line: underline;
text-underline-offset: 2px;
}