Strikethrough with CSS

The strikethrough with css you get it with the attribute text-decoration.

The CSS text decoration attribute accepts several values, for example the text strikeout, but also the underline, or even the line above the line (which I don’t really know in which cases it can be used, but it can be used too) .

Well then, you get the strikethrough text with the value “line-through”.

This text will be struck through

Remember that using inline styles is not good practice, so ideally you should use some class or something to define your style. For example, a class called “incorrect”.

This paragraph contains information that would not be correct and should therefore appear with strikethrough style.

Then you would define the CSS like this:

.incorrect { text-decoration:line-through; colour: red; }

In this case, in addition to being crossed out, the incorrect text would appear in red.

As always, we remind you that you have this and many other CSS tricks here at .com, in the .

See also  Can I buy a domain without having a website?
Loading Facebook Comments ...
Loading Disqus Comments ...