545

Using HTML tags is supposed to work with GitHub Markdown but, in particular, <s>text</s> is not working for me. It used to work on the now deprecated live preview page, but not on preview of README.md file. It works on wikis. I didn't find any special syntax for strikethrough on the Markdown: Syntax page.

Is it not possible?

0

5 Answers 5

734

Use ~~double tildes around the words~~.

14
  • 6
    won't work on multiple paragraphs at once, but this is good enough too.. tnx
    – Nevena
    May 3, 2011 at 9:25
  • 1
    This also works on dillinger.io. Joined this community just to upvote.
    – MD XF
    Apr 26, 2017 at 16:19
  • 2
    Didn't work for me in the answer editor on Stack Overflow/Exchange.
    – mattyb
    May 11, 2017 at 19:17
  • 1
    It is also working on trello.com. Jul 7, 2017 at 12:39
  • 3
    This did not work for me, perhaps because I'm trying to use it over multiple lines.
    – wogsland
    Oct 8, 2020 at 10:44
162

I just used the following syntax

<del> ... </del>

successfully on GitHub in an issue description.

6
  • 4
    This is a good answer too, since Markdown accepts arbitrary HTML tags. Depends on how you want to use it. Apr 26, 2013 at 23:34
  • 3
    Works with Unfuddle, thanks!
    – Stachu
    Jan 2, 2014 at 21:39
  • 3
    Nice! Was looking for this to use on an SE site and indeed this is working on SE too
    – 7ochem
    Mar 4, 2015 at 9:16
  • 1
    Does not work with Gitlab :( Sep 15, 2015 at 22:45
  • 1
    Works with Azure devops but so does ~~ and latter is better IMO. )
    – Mr.Hunt
    Sep 6, 2021 at 7:06
84

I know this is an old question, but I don't see a very detailed answer of the possibilities to strikethrough your text. So here's my answer:

There are several ways to do it:

  1. <strike>strike</strike>strike
  2. <del>strike</del>strike
  3. <s>strike</s>strike
  4. ~~strike~~ → ~~strike~~
  5. ~strike~ → ~strike~

Because tildes don't work on Stack Exchange (later: SE) platforms, the HTML syntax is the most correct way to strike your text. This syntax is a little "hack" to do the same thing instead of the markdown notations.

Because there is no universal notation for markdown text, the notations may be different for each platform. Here is an overview for several platforms:

The GitHub Flavored Markdown only mentions that you can use double tilde, but you can use everything.

4
  • 3
    Great answer, it's more comprehensive than the accepted, as it provides alternatives to places where ~~ doesn't work ~~ In Multimarkdown and Marked2, the tilde doesn't work for me.
    – Paul Solt
    Aug 8, 2018 at 15:35
  • To bad <s>the html</s> doesn't work in comments.
    – Chloe
    Jan 31, 2019 at 4:23
  • I just confirmed that on Keybase chat, ~~ around characters does strike them out. Oct 19, 2019 at 13:22
  • 1
    Slack takes one tilde only: ~like so~ in messages Mar 3, 2021 at 23:05
10

Use ~ to enclose whatever you want to strike.

Here's a GIF.

animated gif showing use of tilde

Just use ~ character at the start and the end in markdown.

~strike~

0
-2

<s> and </s> is the only thing working
~ and ~~ both of them are not working under

Not the answer you're looking for? Browse other questions tagged or ask your own question.