CSS strike through technique

CSS strike through is not an exact property but you can achieve this goal with text-decoration.

This is an example of css strike through.

p {
	text-decoration: line-through;
<p>This is an example of css strike through.</p>

Also, you can use the class name to apply the text-decoration: line-through; property.

.strike-through {
	text-decoration: line-through;
<h2 class="strike-through">This is an example of css strike through.</h2>

Strikethrough certain word(s)

Consectetur adipisicing elit necessitatibus sit quaerat liquid.

.strike-through {
	text-decoration: line-through;
<p>Consectetur adipisicing elit <span class="strike-through">necessitatibus</span> sit quaerat aliquid.</p>

HTML <del> versus CSS strike through (text-decoration: line-through)

Also, you can use HTML <del> tag for the same purpose. And this <del> tag is semantically meaningful to web browsers.

Especially if you are going to display outdated content or which content is not applicable at a certain context.

The pricing tables are a great example of the basic uses of this <del> tag.This is an example of deleted text or strike through.

<del>This is an example of deleted text or strike through.</del>
Basic Package Premium Package
Custom design Custom design
		<th>Basic Package</th>
		<th>Premium Package</th>
		<td><del>Custom design</del></td>
		<td>Custom design</td>

CSS for a few other strike through styles

Strike through style CSS
Consectetur text-decoration: line-through;
Adipisicing text-decoration: line-through; text-decoration-style: wavy;
Incididunt text-decoration: line-through; text-decoration-style: dotted;
Exercitation text-decoration: line-through; text-decoration-style: dashed;
Reprehenderit text-decoration: line-through; text-decoration-style: double;
Voluptate text-decoration: line-through; text-decoration-style: double; text-decoration-color: #EA4335;

CSS for a few other styles as the strike through

Line style CSS
Consectetur -webkit-text-decoration-line: overline; text-decoration-line: overline;
Adipisicing -webkit-text-decoration-line: underline; text-decoration-line: underline;
Incididunt -webkit-text-decoration-line: overline underline; text-decoration-line: overline underline;

See also:

  1. What kind of freelance job can you do only knowing HTML & CSS?
  2. What is the difference between CSS and CSS3?
  3. How do CSS positions work?
  4. Centering anything vertically with CSS
  5. Border in CSS