Strikethrough in HTML and CSS the Right Way

For web pages, Unicode tricks are the wrong tool. HTML and CSS give you semantic, accessible strikethrough. Here is how to use the s, del, and ins elements and text-decoration correctly.

Strikethrough in HTML and CSS the Right Way

The semantic elements

HTML offers meaning aware elements for crossed out text. The <del> element marks content that has been removed, and <ins> marks content that has been added, which pair naturally for edits. The <s> element indicates text that is no longer accurate or relevant, such as an old price.

Styling with text-decoration

When you only need the visual line without a specific meaning, apply text-decoration: line-through in CSS. You can control the colour and thickness with text-decoration-color and text-decoration-thickness, which is how this very site draws its red strike accents.

Keeping it accessible

The semantic elements communicate intent to assistive technology, which is why they are preferred over a bare CSS line for meaningful changes. Reserve plain text-decoration for decorative cases, and use del and ins when the change carries meaning.

When Unicode is still right

Unicode strikethrough belongs in plain text environments such as chat apps and social bios, where you cannot write HTML. On your own web pages, always prefer the markup approach, which is cleaner, more accessible, and easier to style.

Frequently Asked Questions

Ready to cross out some text?

Type your words in the generator and copy the crossed out version in one tap.

Open the Generator
The Strikethrough Text Team
We write about strikethrough, Unicode text effects, and formatting across apps and platforms. Read our editorial policy.