Strike Through using HTML

HTML Nov 10, 2022

CSS is great for styling, but not very good for providing any meaning to your content. But don't fear, HTML semantic tags can sort it. When you're trying to strikethrough content, there's typically a reason you're doing that. That reason can be described using the proper HTML tag. You can use <del> or <s> and give your code semantic meaning.

For example: <s>Brush teeth</s> would look like:

Brush teeth

The <del> tag would would look the same but serve a different purpose. You need to pick the right one for the right reason.


<s> - Use this when you are trying to represent things that are no longer relevant or no longer accurate.

<del> - Use this when you want to indicate something is removed from the document.


And that's it!

Tags