Encodera

Thanks for reading!

Donate to the site — we work hard for you.

HTML & CSS reference

<del>, <s>

Struck-through text: `<del>` for content removed from the document, `<s>` for outdated content; `<ins>` for added content.

Syntax

<del>removed</del> <ins>added</ins>

Attributes

ParameterTypeDescription
datetimedateOptional. When the change was made (for `<del>` and `<ins>`).

Examples

The old price is no longer valid:

<p>Price: <s>$25</s> $19</p>

An edit in a to-do list:

<ul>
  <li><del>Buy beans</del></li>
  <li>Grind beans <ins>(medium)</ins></li>
</ul>

Notes

The difference is meaning: <del> and <ins> are edits of the document, <s> is something no longer correct but kept for comparison (an old price). For purely visual strike-through use CSS text-decoration: line-through.

See also

  • <mark> — Text highlighted as if with a marker — for example, matches in search results.
  • <b>, <i>, <u> — Highlighting without extra importance: `<b>` in bold, `<i>` in italics, `<u>` underlined.
  • <time> — A date or time readable by both people and programs.

In the tutorial

  • Text formatting — Inline tags for text — strong and em, mark, del and ins, sub and sup, code, kbd and pre, abbr and q.

Thanks for reading!

Donate to the site — we work hard for you.