Introduction

Utilizing text effects in Markdown can improve the readability and emphasize key points of your written content. In this tutorial, we will be focusing on how to cross out text in Markdown. Remember, cross-out is the same as strike-out, but we will be using the term ‘cross out’ exclusively in this article. So let’s dive into it.

Using Cross Out in Markdown

Crossing out text in Markdown can be achieved using the double tilde (~~) syntax. The format would look like this: ~~crossed out text~~. For example:

I am ~~not~~ a computer.

After rendering, you would see:

I am not a computer.

The ‘not’ is crossed out in the above sentence.

Use Cases for Cross Out Text

There are many practical uses for crossing out text, especially when changes, corrections, or updates are required.

  1. To signify updates or changes without losing the original content.
  2. Highlighting corrections in a document.
  3. Indicating completed tasks in a to-do list.

Example:

- [x] ~~Write the blog post~~
- [ ] Edit the blog post
- [ ] Publish the blog post

After rendering, the above list would look like:

  • Write the blog post
  • Edit the blog post
  • Publish the blog post

Here, the first task is crossed out, indicating it has been completed.

Compatibility Issues

While the double tilde syntax is commonly used to cross out text in Markdown, it’s important to note that not every Markdown renderer supports this syntax.

Different renderers follow different specifications - some follow the original Markdown spec (which does not include strike-through), while others use variations like GitHub Flavored Markdown (GFM), which supports the ~~ syntax.

Therefore, if you’re having trouble with crossing out text, make sure to check if your renderer supports this syntax. You can learn more about different Markdown renderers and how they handle text effects in our post about rendering Markdown in React.

Conclusion

Crossing out text in markdown is a straightforward process, but it is essential to know when and where to use this feature. I hope this tutorial was beneficial for everyone and clarified how to cross out text using Markdown syntax. Happy writing!

Don’t stop learning here, explore more about other Markdown features like how to preview rendered Markdown in vim and practical guide to blockquotes in Markdown.