How to make CSS strikethrough different color from text?

Spread the love

Sometimes, we want to make CSS strikethrough different color from text.

In this article, we’ll look at how to make CSS strikethrough different color from text.

How to make CSS strikethrough different color from text?

To make CSS strikethrough different color from text, we use the strike element.

For instance, we write

<strike style="color: red">
  <span style="color: black">black with red strikethrough</span>
</strike>

to make the strikethrough line red on the strike tag.

And then we put the text that we want to strike through inside it.

Conclusion

To make CSS strikethrough different color from text, we use the strike element.

Leave a Reply

Your email address will not be published. Required fields are marked *