Markdown Cheatsheet: A Quick Reference Guide

Markdown Cheatsheet: A Quick Reference Guide

Mar 5, 2025

3 min read

Alex @ MD2FILE avatar
Alex @ MD2FILE

Markdown is a lightweight markup language that makes formatting text simple and efficient. It’s widely used for writing documentation, blog posts, and content on platforms like GitHub, Stack Overflow, and more.

Whether you’re a writer, developer, or just someone looking to format text quickly, Markdown is a handy tool. This Markdown cheat sheet will guide you through both the standard syntax, which works across most platforms, and extended features that might vary depending on where you use it.

Markdown Cheatsheet: Standard Syntax Explained

Here’s a breakdown of the core Markdown elements you’ll use most often, with examples to help you get started.

Headings

Create headings by using # symbols, from h1 to h6. For example:

  • # H1 for the main title
  • ## H2 for a subheading

Example:

# This is H1
## This is H2

Text Formatting

Make your text stand out with bold, italic, or strikethrough:

  • Bold: **text**
  • Italic: *text*
  • Strikethrough: ~~text~~

Example:

This is **bold text**, *italic text*, and ~~strikethrough text~~.

Lists

Organize items with ordered (numbered) or unordered (bulleted) lists:

  • Ordered: Start with 1. Item
  • Unordered: Use - Item or * Item

Example:

1. First item
2. Second item

- First item
- Second item

Code

Show code inline with `code` or in blocks using triple backticks:

  • Inline:
`variable`
  • Block:
```python
print("Hello, World!")
```

Example:

This is `inline code`.

Here's a code block:

```python
print("Hello, World!")
```

Link to websites or embed images easily:

  • Link: `[text](url)`
  • Image: `![alt text](url)`

Example:

Visit [Google](https://www.google.com).

Here's an image: ![Logo](logo.png)

Blockquotes and Horizontal Rules

Quote text with > text for blockquotes, and use *** or --- for horizontal lines.

Example:

> This is a blockquote.

***

---

Extended Markdown Syntax for Advanced Formatting

Some features go beyond the basics and may not work everywhere, so check your platform’s documentation.

Tables

Create tables with headers and cells using | and -:

| Header | Header |
|--------|--------|
| Cell   | Cell   |

Example:

| First Name | Last Name |
|------------|-----------|
| John       | Doe       |

Footnotes

Add footnotes with [^note] and define them below:

This is a footnote.[^1]

[^1]: This is the footnote text.

Example:

This is a footnote.[^1]

[^1]: This is the footnote text.

Emojis and Math

Some platforms support emojis with 😄 and math with LaTeX syntax:

  • Emoji: 😄
  • Math: Inline E=mc2E=mc^2, block x+y=zx + y = z

Example:

:smile:

This is an equation: $E=mc^2$

Summary Table: Markdown Elements, Their Syntax and Examples

ElementSyntax ExampleExample Output
Headings# H1, ## H2# This is H1, ## This is H2
Bold Text**text****bold text**
Italic Text*text**italic text*
Strikethrough~~text~~~~strikethrough text~~
Ordered Lists1. Item1. First item
Unordered Lists- Item- First item
Inline Code`code``variable`
Code Blocks```python\nprint("Hello")\n``````python\nprint("Hello")\n```
Inline Links[text](url)[Google](https://www.google.com)
Reference Links[text][id], [id]: url[Google][1], [1]: url
Images![alt](url)![Logo](logo.png)
Blockquotes> text> This is a blockquote
Horizontal Rules******
Tables`H
Footnotes[^note], [^note]: textThis is a footnote.[^1], [^1]: Text
Emojis😄😄
Math Inline$E = mc^2$$E = mc^2$
Math Block$$ x + y = z $$$$ x + y = z $$

Wrapping Up

This cheat sheet covers the essentials of Markdown, from standard formatting to extended features. Remember, some advanced syntax like tables or footnotes might not work on every platform, so always check the specific documentation, like the Markdown Guide or CommonMark Spec.

To enhance your Markdown experience, consider using editors like MD2FILE or Visual Studio Code with Markdown extensions.

Happy formatting!

Found this post interesting? Please help us and share it!