195

I've been using <s> to put strikeout in posts -- is there a Markdown way of doing it?

It seems like -[Text here] would make sense, hehe :)

2
  • 4
    Some markdown engines use ~text~ for strike through, but this doesn't work in stackoverflow. Commented May 27, 2020 at 8:27
  • 14
    Pandoc uses ~~strike this~~. So does Github, Bitbucket, …
    – erik
    Commented Aug 15, 2021 at 14:56

7 Answers 7

117

Yes.         No.         Maybe so.

This means that comments may not include strikeouts.

9
  • 2
    So in other words, the answer is no, there is no markdown way of expressing it. :*( Commented Sep 7, 2010 at 19:26
  • 30
    I <s>love</s> hate StackExchange comments :P (And their lack of ability for me to use strikeout) Commented Sep 7, 2010 at 19:30
  • 5
    @svnpenn - "Happiness and the absurd are two sons of the same earth. They are inseparable." Albert Camus Commented Jun 14, 2012 at 17:00
  • 20
    Where in this answer you wrote how to type a strikeout?????!?!!!??!?!?!
    – Ahmad
    Commented Jun 22, 2015 at 8:59
  • 1
    @Ahmad The answer allows you to use html tags like <s> (which stands for strike-through). But they don't work in comments. Commented Nov 13, 2015 at 19:14
  • 5
    @Ahmad, you can always click the "edit" button (or the "improve this question/answer" button, even if you're not logged in) to see how a post's formatting was typed in.
    – Wildcard
    Commented Jan 25, 2016 at 12:33
  • 3
    Not everybody knows about the tiny edit button. People might not have enough reputation to edit it also. I have edited the answer to show <s> tags
    – nacho4d
    Commented May 11, 2016 at 15:15
  • 17
    T̶h̶i̶s̶ ̶c̶o̶m̶m̶e̶n̶t̶ ̶i̶s̶ ̶s̶t̶r̶i̶k̶e̶d̶ ̶o̶u̶t̶ using this
    – pulsejet
    Commented Mar 15, 2017 at 15:21
  • 3
    @pulsejet It's just a broken underline that is a tad to high, typographically. Commented Nov 25, 2021 at 8:11
69

<del> also works. As you can see here. It might be more semantically correct, especially if you include the "datetime" attribute.

7
  • 3
    It might be more semantically correct. I often use strikeout to denote done items, so in that case the semantic is different than "deleted". But you are right, in some case <del> is semantically more accurate. Commented Jul 16, 2012 at 16:56
  • Came here through a google search, <del> sounds nice, esp. with a datetime attribute, but it also removed code formatting whereas <s> did not.
    – notacouch
    Commented Nov 13, 2013 at 22:51
  • 1
    Except <del> isn't Markdown; it would be HTML, if I'm not mistaken. Commented Sep 17, 2015 at 22:58
  • 2
    @Sarah: Of course it's HTML. The answer to "Does markdown have a way to express strikeout?" is "No, but you can use some HTML to accomplish the same thing on Stack Exchange sites. Here's how..."
    – ale
    Commented Sep 17, 2015 at 23:00
  • @AlE.: Okay, sorry about that. My mistake. I thought the question had to do with Markdown, specifically, not just Markdown on Stack Exchange. Because some sites and Markdown editors do not support HTML, just Markdown. So I was just stating. Thanks for clarifying on that. :) Commented Sep 18, 2015 at 18:43
  • @Sarah: A question about Markdown in general would be off-topic here. This site is for questions about the workings of the Stack Exchange network and the software that empowers it, thus by definition the question would have to be about the Stack Exchange flavor of Markdown.
    – ale
    Commented Sep 19, 2015 at 0:08
  • @ale With datetime attribute it doesn't work :(
    – Volo
    Commented Oct 23, 2017 at 22:35
53

It's rather inconsistent. In regular questions/answers, you can use <s>HTML tags</s> to get strikethrough text like this:

<s>like this</s>

In chat, you can surround text with --- to get strikethrough, but this doesn't work in regular questions/answers:

---strikethrough text---
4
  • 10
    And it looks like <s>neither method</s> works in comments to ---achieve--- strikethrough.
    – Jez
    Commented Jul 12, 2013 at 9:08
  • 21
    U̶s̶e̶ ̶t̶h̶e̶ ̶f̶o̶r̶c̶e̶ ̶L̶u̶k̶e̶ ̶:̶)̶
    – Noctis
    Commented May 15, 2014 at 23:47
  • 5
    @Noctis y̶o̶u̶ ̶c̶h̶e̶a̶t̶e̶d̶!̶ +1 for lateral thinking, UTF8 the force Luke 😉
    – earcam
    Commented Sep 3, 2015 at 19:46
  • 1
    @earcam it's only cheating if you break the rules ... The first rule of f̶i̶g̶h̶t̶c̶l̶u̶b̶ is that you don't speak about f̶i̶g̶h̶t̶c̶l̶u̶b̶ ... :)
    – Noctis
    Commented Sep 3, 2015 at 21:52
34

It may be off-topic, but since I came to this question while looking for a contextualized solution on Bitbucket and GitHub, I'd like to add the double tilde too, the only which worked in real Markdown.

~~example~~

4
  • 4
    since you mention Bitbucket I thought I'd add I just found you can use hypens around a phrase in Jira to get strikethrough, eg -deleted-
    – Anentropic
    Commented Jul 2, 2015 at 15:55
  • 1
    The double tilde is excellent, because it also works in Trello.
    – zoagli
    Commented Feb 10, 2017 at 9:34
  • This works while entering the markdown @ PR comments in bitbucket
    – Mohan Ram
    Commented Jan 7, 2020 at 6:10
  • 1
    ~~Test~~ (one day, maybe)
    – mtraceur
    Commented Jun 9, 2021 at 10:47
12

Though a strike-through syntax wasn't available in the original Markdown, as of today (2015), many implementations have unofficially settled on the ~(tilde) character which is supported on Reddit and as someone here mentioned, on Bitbucket too.

Let's hope Stack Overflow also adds this syntax to its Markdown implementation soon!

2
  • 1
    It's unlikely, since ~ is not used for strike-through in the current CommonMark spec, which SE will be moving to once it stabilizes a bit more. Commented Nov 13, 2015 at 23:16
  • 3
    (Skype has also introduced ~ for formatting strikethrough.) Commented Dec 17, 2015 at 16:03
4

Why is the selected answer such a wrong and imprecise one?!
Well, probably because people answer in comments rather than in... an answer.

Anyway.
While Markdown technically doesn't support strikethrough at the moment, several comments pointed out that using strikethrough in comments is possible.
It is not handy, since ~ isn't supported yet, but actually possible (using Unicode characters)


So, to strike through text in questions, use the <\s> or <\del> tags
Example striked out using <\s> tag
Example striked out using <\del> tag

For comments, use external converters or tools, like those websites (credits go to respective commenters)

http://yaytext.com/strike/
E̶x̶a̶m̶p̶l̶e̶ ̶s̶t̶r̶i̶k̶e̶d̶ ̶o̶u̶t̶ ̶u̶s̶i̶n̶g̶ ̶y̶a̶y̶t̶e̶x̶t̶ (long strikethrough)
http://adamvarga.com/strike/
E̶x̶a̶m̶p̶l̶e̶ ̶s̶t̶r̶i̶k̶e̶d̶ ̶o̶u̶t̶ ̶u̶s̶i̶n̶g̶ ̶a̶d̶a̶m̶v̶a̶r̶g̶a̶ (note the site also features an extension. I did install a similar one for Gmail, once: that may be very handy.)

5
  • 1
    And for the sake of completeness : E̵̵̵x̵̵̵a̵̵̵m̵̵̵p̵̵̵l̵̵̵e̵̵̵ ̵̵̵s̵̵̵t̵̵̵r̵̵̵i̵̵̵k̵̵̵e̵̵̵d̵̵̵ ̵̵̵o̵̵̵u̵̵̵t̵̵̵ ̵̵̵u̵̵̵s̵̵̵i̵̵̵n̵̵̵g̵̵̵ ̵̵̵y̵̵̵a̵̵̵y̵̵̵t̵̵̵e̵̵̵x̵̵̵t̵̵̵ ̵(̵s̵h̵o̵r̵t̵ ̵s̵t̵r̵i̵k̵e̵t̵h̵r̵o̵u̵g̵h̵)̵ (̶l̶o̶n̶g̶ ̶s̶t̶r̶i̶k̶e̶t̶h̶r̶o̶u̶g̶h̶)̶ (̴t̴i̴l̴d̴e̴ ̴s̴t̴r̴i̴k̴e̴t̴h̴r̴o̴u̴g̴h̴)̴ E̶x̶a̶m̶p̶l̶e̶ ̶s̶t̶r̶i̶k̶e̶d̶ ̶o̶u̶t̶ ̶u̶s̶i̶n̶g̶ ̶a̶d̶a̶m̶v̶a̶r̶g̶a̶ Looks like some work better than other :p
    – Balmipour
    Commented Nov 14, 2018 at 10:33
  • 5
    That's not part of markdown, just special characters, hence not a direct answer to the question here which clearly asks for a way using markdown. Commented Nov 14, 2018 at 11:45
  • Indeed, my bad. Guess I should move my answer to one of the other more relevant questions, like "Is strikethrough allowed in comments". Meh, my tabs are closed now... Looks like I let myself troll by the answer, which states "comment may not include strikeout" while thats not what the question was asking for. Still... looks like this means the selected answer remains a bad one, right ?
    – Balmipour
    Commented Nov 14, 2018 at 12:19
  • meta.stackexchange.com/questions/135209/…. Commented Nov 14, 2018 at 12:21
  • After a 2nd glance at this, the reason I answered here was clearly the selected answer. It affirms "comments may not include strikeouts", which is wrong, and shows stroke-out text without even explaining how to do it. I visited a few other threads, including the one you link here, and they fortunately got more useful answers, which is why I answered here. So I just edited my answer to precise that "While markdown technically doesn't provide strikethrough ATM, you may achieve it with unicode"
    – Balmipour
    Commented Nov 14, 2018 at 12:40
-3

It's 2024 and X X ~~X~~ all no longer work.

5
  • 3
    The first two you had typed wrong. I don’t think ~ was ever supported here. Commented Jun 27 at 9:27
  • 1
    Yes, when you don't use the correct Markdown, it doesn't work. As I said before you escaped the angle brackets. Plainly visible in the revision history. Same with this post. Don't escape them.
    – VLAZ
    Commented Jun 27 at 9:32
  • All I did was type U+003C LESS-THAN SIGN etc. Any escaping and unescaping were done behind my back. Yes I see U+005C REVERSE SOLIDUS in the edit history you posted. But I never see that on my screen. Conclusion: the user has no control over it. Commented Jun 27 at 11:17
  • 2
    There is no site functionality that escapes angle brackets, as far as I'm aware. The escapes show up correct in the regular editor. Maybe the new editor does it but I don't think it's available on MSE. You might have an addon that does something there.
    – VLAZ
    Commented Jun 27 at 12:19
  • Of the three choices in the upper right, I was using the default, called "Rich text mode". OK, next time I'll try "Markdown mode" and "Markdown with preview mode". Commented Jun 27 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .