How to change the underline color in CSS?
Styling is implemented to HTML text to make it catchy and attractive. The text can be made italic, underline, and bold as per requirement.
Underline tag: To change the color of the underline, we need to add some styling using CSS (inline/internal/external). By default, the color of the underline is black. In CSS, we will use text-decoration property to style underline.
<u> Some Text Here </u>
CSS text-decoration-color Property: This property is used to specify the color of decorations (overlines, underlines, and line-throughs) over the text.
text-decoration-color: color | initial | inherit ;
Below examples illustrate the approach of changing the underline color by CSS