216

If you highlight some text, you can just press a button to have it automatically emphasized on indented 4 spaces for a code sample. I think it would be great if we had this feature with strike-throughs so I don't have to manually type s tags. People use strikethoughs to delete text from their posts when editing it and adding information. This is nicer than just deleting it because it gets the point across that its older information but you can still see the original text.

2

3 Answers 3

19

There's no way that strikethrough is used enough to justify a button, and I certainly don't want to encourage its use any more than it already is..

15
  • 62
    Why don't you want to encourage its use?
    – endolith
    Commented Nov 7, 2009 at 21:55
  • 4
    Actually I use it a lot. When I ask question I do a multi-teared question in where the answer isn't always done with one post. For that reason, I use the strikethrough because it will make people realize parts of the question is already answered. Like this question. stackoverflow.com/questions/12079285/…
    – Matt Ridge
    Commented Aug 22, 2012 at 19:48
  • 72
    Strikethrough can be legally useful, when somebody replied to your answer in comments and you fixed your code as a result. If you just fix it, people may start wondering why the comment is odd. This way you show what the original answer was and why the comment is valid.
    – user199936
    Commented Oct 26, 2012 at 15:04
  • 11
    @CrazyJugglerDrummer No way! As user199936 correctly pointed out, there are far to many odd, useless, non-sense comments in entire SE, actually because people are deleting instead of striking through. So, I may agree with Jeff, that such button isn't welcome, but I certainly won't agree with you, that deleting is better than using strike-through.
    – trejder
    Commented Dec 12, 2013 at 12:34
  • 16
    @Jeff Atwood, there is more in heaven and earth than is dreamed of in your philosophy. There are a variety of valid uses for the strikethough styling, and you should remain agnostic, not partisan. You don't punish the valid uses because there is the possibility of abuse. Especially so on a site about learning English, where one can strikeout errors and show the corrected version side-by-side. But it's not a big deal, since we have the markup alternatives.
    – Tim
    Commented Sep 14, 2014 at 20:06
  • 3
    @trejder Delete those comments, then. Flag as obsolete. A clean, correct answer is more readable than a patchwork of wrong strike through text. And there should not be any need for readers to look at comments at all.
    – user259867
    Commented Sep 14, 2014 at 21:47
  • Sometimes it can be very helpful to see the original mistakes made by the poster, and the way of how they eventually got to the answer. This can be more helpful than the actual answer. If you edit and correct everything, this is all gone (and you're not going to look at the history).
    – Ela782
    Commented May 20, 2018 at 8:10
  • 1
    I googled how to strike text and found current topic. I haven't know that I could use del or strike. I vote for adding new button Commented Aug 28, 2019 at 20:22
  • Maybe strikethrough isn't used enough because of the missing button. Have you ever edited a post?
    – Damien
    Commented Jan 14, 2020 at 12:26
  • strikethru is super useful to make change announcement dude!
    – Nam G VU
    Commented Apr 10, 2020 at 8:52
  • 4
    Strikethrough is not being used much because there's no button. Just a minute ago somebody's answer made it clear to me that a part of my question was ridiculous, but if I would just remove that part the answer would look oddly irrelevant to the rest of the question. Thanks to ChrisF's answer I was able to strikethrough.
    – Michael
    Commented Jul 3, 2021 at 19:08
  • 1
    Having a strike through button is a useful way of showing that something was true once, but no longer is. By deleting things that are no longer true, you can create confusion to people looking at different sources trying to research a topic. When you strike out old information you confirm it as false; so, that a person looking at your post and another post based on old information can clearly see which information is outdated. So, a strike through can disambiguate confusion caused by change over time.
    – Nosajimiki
    Commented Apr 22, 2022 at 16:47
  • @user199936 this makes no sense - an answer should be standalone, and comments should address it, and not the other way around. There is a "flag comment as obsolete" button exactly for that purpose.
    – Gulzar
    Commented Aug 17, 2022 at 13:41
  • How is this marked as the right answer? The most voted is clearly the right answer. Being a button or not is not the point, the point is to allow people to add strike-though and the most voted answer does just that. Some of you talk about "clean replies", and yet this one is as useless as it could be. I agree this answer doesn't need a strike-through, it needs to be deleted. Commented Sep 28, 2022 at 14:32
  • @trejder If removing one comment that should be removed, causes another comment to become nonsense, generally that one should also just be removed. Commented Dec 13, 2023 at 5:45
259

In the absence of a button (and given that Jeff has said it's not likely to be implemented) you can use the HTML tag:

Like this or this or this

Like <strike>this</strike> or <s>this</s> or <del>this</del>

See this answer for a complete list of the HTML that's allowed.

9
  • 4
    One of the key points in the suggestion was that the user didn't have to type one of these. Providing a button produces a lower barrier of entry for people and promotes the use of the feature -- like bold and italics. I don't know if strikethrough is the only HTML feature that should be promoted, nor do I have a strong opinion on if strikethrough should be promoted to a button. Just making an observation that your answer/point seems to go against the grain of the CrazyJugglerDrummer's desire.
    – ckittel
    Commented Jul 26, 2009 at 20:36
  • 1
    can you do this in comment Commented Jun 27, 2015 at 17:19
  • 5
    It does <strike>not</strike> work in comments... <s>Even</s> with the alternate <del>tags</del>. Commented Jun 17, 2016 at 11:25
  • 2
    @Juha HTML S̶t̶r̶i̶k̶e̶t̶h̶r̶o̶u̶g̶h̶ in comments work for me!!! Commented May 30, 2017 at 3:29
  • C̶h̶e̶a̶t̶e̶r̶.̶ Commented Jun 2, 2017 at 18:29
  • 1
    <strike>this</strike> or <s>this</s> or <del>this</del> Why doesn't it work for me in comments? @JuhaUntinen
    – user361935
    Commented Jan 30, 2018 at 9:36
  • @ChrisF meta.stackexchange.com/questions/135209/…
    – user361935
    Commented Jan 30, 2018 at 9:43
  • is there markdown for this?
    – njzk2
    Commented Oct 16, 2019 at 1:52
  • @njzk2 Standard markdown for strikethrough is like ~this~ but I don't think it's supported on Stack Exchange. Commented Jun 1, 2020 at 19:37
14

Might be obvious to some but, as a useful addition, you can wrap your code in strikethrough,
e.g. code... (i.e. <s>`code...`</s>), but it won't show up if you include it inside `<s>code</s>`.

Handy for code edits...

To use strikethrough within the same code, it is possible to use <code>co<s>de...</s></code> e.g. code....

6
  • 2
    I've still yet to see a legitimate use of strike though. It almost universally leads to me reaching for the edit button Commented Mar 14, 2014 at 12:36
  • 3
    Actually, <code><s>code</s></code> will work in questions / answers, but you need to use HTML <code> tags instead of backticks (and escape any HTML / Markdown special characters in your code). Of course, it won't work in comments, since those don't support HTML tags at all. Commented Mar 14, 2014 at 13:28
  • didn't know <code>. cheers. Commented Mar 14, 2014 at 21:09
  • @Ilmari W̶o̶r̶k̶s̶̶ for me! Commented May 30, 2017 at 3:30
  • 1
    @JohnMiliter looks underlined to me...
    – Ruslan
    Commented Jun 22, 2021 at 18:34
  • 1
    @RichardTingle Depends a lot what Stacks you are on. If you are just on Stackoverflow, you may not see it properly used much, but for English.SE, law.SE, WB.SE, etc. it would be very helpful because it is used in other ways than just preserving simple edits.
    – Nosajimiki
    Commented Apr 22, 2022 at 16:53

You must log in to answer this question.

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