Start Coding

Markdown Strikethrough

Strikethrough is a useful formatting option in Markdown that allows you to indicate text that has been deleted or is no longer relevant. It's a valuable tool for showing changes or updates in your documents.

Syntax

To create strikethrough text in Markdown, simply enclose the desired text with double tildes (~~) on both sides. This syntax is supported in most Markdown flavors, including GitHub Flavored Markdown (GFM).

Examples

Here are two examples demonstrating how to use strikethrough in Markdown:

~~This text will appear with a line through it.~~

I need to buy ~~milk~~ almond milk from the store.

When rendered, these examples will appear as:

This text will appear with a line through it.

I need to buy milk almond milk from the store.

Use Cases

Strikethrough can be particularly useful in various scenarios:

  • Showing edits or revisions in documents
  • Indicating completed tasks in to-do lists
  • Highlighting changes in version control systems
  • Emphasizing corrections or updates in blog posts

Best Practices

When using strikethrough in your Markdown documents, consider these tips:

  1. Use strikethrough sparingly to maintain readability
  2. Combine with other formatting options for clarity (e.g., **~~bold and strikethrough~~**)
  3. Ensure the struck-through text is still legible
  4. Provide context or explanations for significant strikethroughs

Compatibility

While strikethrough is widely supported, it's not part of the core CommonMark specification. Always check your target platform's Markdown support if strikethrough is crucial for your content.

Related Concepts

To further enhance your Markdown skills, explore these related topics:

By mastering strikethrough and other Markdown formatting options, you'll be able to create more expressive and informative documents with ease.