170

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
  • 2
    Some markdown engines use ~text~ for strike through, but this doesn't work in stackoverflow. May 27, 2020 at 8:27
  • 3
    Pandoc uses ~~strike this~~. So does Github, Bitbucket, …
    – erik
    Aug 15, 2021 at 14:56

6 Answers 6

111

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. :*( Sep 7, 2010 at 19:26
  • 27
    I <s>love</s> hate StackExchange comments :P (And their lack of ability for me to use strikeout) Sep 7, 2010 at 19:30
  • 5
    @svnpenn - "Happiness and the absurd are two sons of the same earth. They are inseparable." Albert Camus Jun 14, 2012 at 17:00
  • 17
    Where in this answer you wrote how to type a strikeout?????!?!!!??!?!?!
    – Ahmad
    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. 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
    Jan 25, 2016 at 12:33
  • 2
    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
    May 11, 2016 at 15:15
  • 14
    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
    Mar 15, 2017 at 15:21
  • 2
    @pulsejet It's just a broken underline that is a tad to high, typographically. Nov 25, 2021 at 8:11
60

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

7
  • 2
    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. 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
    Nov 13, 2013 at 22:51
  • 1
    Except <del> isn't Markdown; it would be HTML, if I'm not mistaken. Sep 17, 2015 at 22:58
  • 1
    @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
    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. :) 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
    Sep 19, 2015 at 0:08
  • @ale With datetime attribute it doesn't work :(
    – Idolon
    Oct 23, 2017 at 22:35
46

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
  • 8
    And it looks like <s>neither method</s> works in comments to ---achieve--- strikethrough.
    – Jez
    Jul 12, 2013 at 9:08
  • 19
    U̶s̶e̶ ̶t̶h̶e̶ ̶f̶o̶r̶c̶e̶ ̶L̶u̶k̶e̶ ̶:̶)̶
    – Noctis
    May 15, 2014 at 23:47
  • 4
    @Noctis y̶o̶u̶ ̶c̶h̶e̶a̶t̶e̶d̶!̶ +1 for lateral thinking, UTF8 the force Luke 😉
    – earcam
    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
    Sep 3, 2015 at 21:52
27

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
    Jul 2, 2015 at 15:55
  • 1
    The double tilde is excellent, because it also works in Trello.
    – zoagli
    Feb 10, 2017 at 9:34
  • This works while entering the markdown @ PR comments in bitbucket
    – Mohan Ram
    Jan 7, 2020 at 6:10
  • ~~Test~~ (one day, maybe)
    – mtraceur
    Jun 9, 2021 at 10:47
11

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. Nov 13, 2015 at 23:16
  • 3
    (Skype has also introduced ~ for formatting strikethrough.) Dec 17, 2015 at 16:03
5

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 or tags** \ *Example striked out using tag* \ *Example striked out using 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
  • 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
    Nov 14, 2018 at 10:33
  • 3
    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. 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
    Nov 14, 2018 at 12:19
  • 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
    Nov 14, 2018 at 12:40

You must log in to answer this question.

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