Make the element to be inline-block
and it won't get affected by the underline:
a {
text-decoration: underline;
}
a #myspan {
color: black;
display:inline-block;
}
a:active #myspan {
color: grey;
}
a:visited #myspan {
color: yellow;
}
a:hover #myspan {
color: red;
}
<a href="#">A link <span id="myspan">some additional information</span></a>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…