Asked • 03/15/19

CSS strikethrough different color from text?

The HTML elements `del`, `strike`, or `s` may all be used for a text strike-through effect. Examples: del....gives: del strike and strike....gives: strike and strikeThe CSS `text-decoration` property with a value `line-through` may be used similarly. The code... text-decoration:line-through ...will also render to look like: text-decoration:line-through However, the strikethrough line is typically the same color as the text. Can CSS be used to make the line a different color?

1 Expert Answer

By:

Benjamin H. answered • 08/02/20

Tutor
4.9 (18)

Full-Stack Web Developer with HTML Experience

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.