The HTML elements del
, strike
, or s
may all be used for a text strike-through effect. Examples:
<del>del</del>
….gives: del
<strike>strike</strike> and <s>strike</s>
….gives: strike and strike
The CSS text-decoration
property with a value line-through
may be used similarly. The code…
<span style="text-decoration:line-through">
text-decoration:line-through
</span>
…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?