+ 24
How to make your text crossed out with a red line?
I tried to use <del> tags. It's nice that they make the text between them crossed out but the crossing is the same color as text. I'd like to make it look like an error someone crossed out. I think a red line over black text is what I need to make it happen.
2 Antworten
+ 40
Well, that's really easy to do with CSS. You need to use text-decoration-color property and set it to any color you desire. In your case it's red.
del {
text-decoration-color: red;
}
BTW text-decoration-color works with other HTML elements as well. Hence you can style your hyperlinks with it as well.
+ 20
Thank you Vitya text-decoration-color works 👍