+ 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.

22nd Feb 2020, 8:35 AM
Alex
Alex - avatar
2 Respuestas
+ 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.
22nd Feb 2020, 8:46 AM
🇺🇦 Drake CDR 🇺🇦
🇺🇦 Drake CDR 🇺🇦 - avatar
+ 20
Thank you Vitya text-decoration-color works 👍
22nd Feb 2020, 10:15 AM
Alex
Alex - avatar