Strikethrough in Markdown

What is Strikethrough?

Strikethrough in Markdown

When words, phrases, or sentences are no longer needed or removed from execution or considered as exclusion then they are represented with a horizontal line in the middle of them, it’s called strikethrough.

It’s similar to, if we make some mistake while writing in a notebook then we strike the wrong sentence or words with a horizontal line.

In programming language, we also comment out the code that should not be considered during execution. 

What is Markdown?

Markdown is a simple lightweight markup language developed by John Gruber in 2004. It is mostly used by technical writers for documentation, and writing well-structured and formatted readme files of packages.

What is Strikethrough in Markdown?

In the markdown, a special character called a tilde (~) is used to strikethrough word, phrase, or sentence from the content. If the sentence is strikethrough, it should not be considered or should be ignored by the user consuming the content.

Strikethrough in Markdown

Note: The above example is tried on the https://markdownlivepreview.com/ website

Syntax for Strikethrough in Markdown.

In the markdown, the tilde (~) is used to achieve the strikethrough. Add two tilde before and after the sentence as shown below.

~~Technolds~~

Precautions while doing Strikethrough in Markdown

  • Make sure you add two tildes (~) before and after the sentence. No less, no extra.
  • There should not be any space in between the tildes (~).

Examples:

Strikethrough a word in Markdown

Welcome to ~~Technolads~~

Strikethrough sentence in Markdown

~~Welcome to Technolads~~

Strikethrough multiple lines in Markdown

~~Welcome to Technolads.~~
~~Your technocal support hub.~~

Limitations:

As we see in the above example 3, to strikethrough multiple lines we have to add a tilde (~) for each line. There is no option of strikethrough multiple lines with one tilde combination. This is the limitation of strikethrough in markdown.

Conclusion:

In this article, we learned how to perform Strikethrugh in Markdown. We hope you can now strikethrough sentences or phrases of the document using markdown. If you are still facing the issue then please do mention details in the comment section or you can always reach out to us using the contact form.

Leave a Comment