+ 4
Can we change the color of the underline only?
10 Antworten
+ 11
Simplest way
u {text-decoration:underline green ;}
+ 9
Rajesh✊✌️ Be careful when naming the class
+ 5
See this bro simple way to add underline color
https://code.sololearn.com/WMoMSe5ixnCC/?ref=app
+ 4
You can use class or id on the particular underlined element and then style the class/id with css:
HTML
<u class="blueline">trying to change the color of the underline </u>
CSS
.blueline{text-decoration-color:blue;}
+ 4
https://code.sololearn.com/WuTuHS3Utk0n/?ref=app
Nice code 👆
+ 3
An example:
https://code.sololearn.com/WJB99hGU5PsN/?ref=app
+ 3
however, you must be aware that some browers may not or bad support css selectors with more than once class on a same element ^^ so you should avoid as possible the first of two corrections given by Razan ;P
+ 1
Sorry it doesn't work....
+ 1
Yes, you can...write underline in span tag and give styling to it.