This trick will show you how you can style the text underlines with a gradient color using a simple couple of lines of CSS.
I will show you the two cases of underlines, the one is normal text underlining and the second is when hovering on the anchor link.
Gradient Underlines with CSS
See the following HTML and CSS code for reference or you can check the codepen example code snippet.
Being Tricky 😉