# text-decoration-line

> The `text-decoration-line` CSS property sets the type of line decoration applied to text, such as 'underline', 'overline' or 'line-through'.

## How do I add a strikethrough to text in CSS?

The property that defines what type of line decoration will be applied to text, such as 'underline', 'overline' or 'line-through'. It allows for combining multiple lines, such as underlining and striking through, to create different text decoration effects.

- Topic: Text Handling
- Type: property
- Browser support: Chrome 57+, Chrome Android 57+, Edge 79+, Firefox 36+, Firefox Android 36+, Safari 12.1+, Safari iOS 12.2+

## Example

Wrong:

```css
.price-old {
  text-decoration-line: underline, line-through;
}
```

Right:

```css
.price-old {
  text-decoration-line: underline line-through;
}
```

Several line values are separated by spaces; with a comma the declaration is invalid and gets ignored.

## Common mistakes

- A sale price is crossed out with CSS only, so screen readers don't know it is the old price.
- Setting `text-decoration-line` twice keeps only the last value instead of both lines.

## Key points

- Removed or outdated content uses `<del>` or `<s>`, not only `text-decoration-line: line-through`.
- Several lines are space-separated in one value, like `underline overline`.

## Interview questions

### Can I combine underline and line-through?

Yes. List both in one value: `text-decoration-line: underline line-through`.

### What is the difference between del and s?

`<del>` marks content removed from a document. `<s>` marks content that is no longer accurate or relevant.

## Related cards

- [text-decoration](https://wonderium.dev/css/text-decoration.md)
- [text-decoration-style](https://wonderium.dev/css/text-decoration-style.md)
- [`<del>`](https://wonderium.dev/html/del.md)
- [`<s>`](https://wonderium.dev/html/s.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/text-decoration-line
- Last updated: 2026-11-25
