Solution 1 :

You can use text-decoration-color, although browser support is spotty

s {
  color: #4287f5;
  text-decoration-color: #eb1515;
}
<s>Text</s>

Problem :

How can I change the color of the the strike-through line?

If I give the strike tag a class and then use CSS to change the color, it also changes the text color. I just want to change the color of the line and not the text.

h1 {
  color: #4287f5;
}

.strike {
  color: #eb1515;
}
<h1><s class="strike">£1000</s></h1>

Comments

Comment posted by Anon2945

It doesn’t work. It’s the same problem. Attaching a class to style the line also styles the text.

Comment posted by Anon2945

I think you need to re-read the question.

Comment posted by KyleMit

sure did … my bad, fixed

Comment posted by Anon2945

Can’t get it working on the browsers I need to use. Seems quite a basic oversight in html.

By