+ 4

Can we change the color of the underline only?

https://code.sololearn.com/WuTuHS3Utk0n/?ref=app

7th Jun 2021, 11:14 AM
Rajesh✊✌️
Rajesh✊✌️ - avatar
10 Respuestas
+ 11
Simplest way u {text-decoration:underline green ;}
9th Jun 2021, 5:33 AM
PASHA from Russia 🇷🇺
PASHA  from Russia  🇷🇺 - avatar
+ 9
Rajesh✊✌️ Be careful when naming the class
7th Jun 2021, 7:33 PM
Razan
Razan - avatar
+ 5
See this bro simple way to add underline color https://code.sololearn.com/WMoMSe5ixnCC/?ref=app
8th Jun 2021, 8:10 AM
🌍🌎🌏AIM🌏🌎🌍
🌍🌎🌏AIM🌏🌎🌍 - avatar
+ 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;}
7th Jun 2021, 11:42 AM
Lisa
Lisa - avatar
+ 4
https://code.sololearn.com/WuTuHS3Utk0n/?ref=app Nice code 👆
9th Jun 2021, 8:44 AM
Tharul Nejana
Tharul Nejana - avatar
7th Jun 2021, 1:15 PM
Lisa
Lisa - avatar
+ 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
7th Jun 2021, 10:54 PM
visph
visph - avatar
+ 1
Sorry it doesn't work....
7th Jun 2021, 12:48 PM
Rajesh✊✌️
Rajesh✊✌️ - avatar
+ 1
Yes, you can...write underline in span tag and give styling to it.
8th Jun 2021, 5:53 PM
Nimra Sharif