Markdown Cheat Sheet

The complete guide to Markdown syntax with interactive examples you can copy and try

Looking for platform-specific syntax?

Headings

Headings

Create headings using # symbols. The number of # symbols determines the heading level (1-6).

Markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Output

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
Tips
  • Always put a space after the # symbols
  • Use heading levels hierarchically
Common Mistakes
  • Skipping heading levels (e.g., going from H1 to H3)

Alternative Headings

Alternative syntax for H1 and H2 using underlines.

Markdown
Heading 1
=========

Heading 2
---------
Output

Heading 1

Heading 2

Emphasis

Bold

Make text bold using double asterisks or underscores.

Markdown
**bold text**
__also bold__
Output

bold text
also bold

Tips
  • Asterisks are more commonly used and work in more contexts

Italic

Make text italic using single asterisks or underscores.

Markdown
*italic text*
_also italic_
Output

italic text
also italic

Bold & Italic

Combine bold and italic using triple asterisks or underscores.

Markdown
***bold and italic***
___also bold and italic___
Output

bold and italic
also bold and italic

Strikethrough

Strike through text using double tildes.

Markdown
~~strikethrough text~~
Output

strikethrough text

Highlight

Highlight text using double equals signs. Note: Not standard Markdown.

Markdown
==highlighted text==
Output

==highlighted text==

Tips
  • This is an extended syntax, not supported everywhere

Lists

Unordered List

Create bullet lists using dashes, asterisks, or plus signs.

Markdown
- Item 1
- Item 2
  - Nested item
  - Another nested
- Item 3
Output
  • Item 1
  • Item 2
    • Nested item
    • Another nested
  • Item 3
Tips
  • Use 2 spaces for nesting
  • Be consistent with your list marker

Ordered List

Create numbered lists using numbers followed by periods.

Markdown
1. First item
2. Second item
3. Third item
   1. Nested item
   2. Another nested
Output
  1. First item
  2. Second item
  3. Third item
    1. Nested item
    2. Another nested
Tips
  • Numbers don't need to be in order - Markdown will auto-number

Images

Image

Embed an image with alt text.

Markdown
![Alt text](https://example.com/image.jpg)
Output

Alt text

Tips
  • Always include descriptive alt text for accessibility

Image with Title

Add a tooltip title to an image.

Markdown
![Alt text](https://example.com/image.jpg "Image title")
Output

Alt text

Linked Image

Make an image clickable by wrapping it in a link.

Markdown
[![Alt text](https://example.com/image.jpg)](https://example.com)
Output

Alt text

Code

Inline Code

Format code inline using backticks.

Markdown
Use `code` inline
Output

Use code inline

Code Block

Create a code block with syntax highlighting.

Markdown
```javascript
const greeting = "Hello, World!";
console.log(greeting);
```
Output
const greeting = "Hello, World!";
console.log(greeting);
Tips
  • Specify the language after the opening backticks for syntax highlighting

Indented Code Block

Create a code block using 4 spaces indentation.

Markdown
    const greeting = "Hello";
    console.log(greeting);
Output
const greeting = "Hello";
console.log(greeting);

Tables

Table

Create tables using pipes and dashes.

Markdown
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1   | Cell 2   | Cell 3   |
| Cell 4   | Cell 5   | Cell 6   |
Output
Header 1 Header 2 Header 3
Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6
Tips
  • Columns don't need to be perfectly aligned
  • Use colons for alignment

Table Alignment

Align table columns using colons.

Markdown
| Left | Center | Right |
|:-----|:------:|------:|
| L    | C      | R     |
Output
Left Center Right
L C R

Blockquotes

Blockquote

Create a blockquote using the > character.

Markdown
> This is a blockquote.
> It can span multiple lines.
Output

This is a blockquote.
It can span multiple lines.

Nested Blockquote

Nest blockquotes using multiple > characters.

Markdown
> Outer quote
>> Nested quote
>>> Even more nested
Output

Outer quote

Nested quote

Even more nested

Horizontal Rules

Horizontal Rule

Create a horizontal line using three or more dashes, asterisks, or underscores.

Markdown
---

***

___
Output



Task Lists

Task List

Create interactive checklists using brackets.

Markdown
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task
Output
  • Completed task
  • Incomplete task
  • Another task

Footnotes

Footnote

Add footnotes to your document.

Markdown
Here's a sentence with a footnote.[^1]

[^1]: This is the footnote content.
Output

Here's a sentence with a footnote.[^1]

[^1]: This is the footnote content.

Other

Line Break

Create a line break by ending a line with two spaces.

Markdown
First line
Second line
Output

First line
Second line

Tips
  • Two spaces at the end of a line creates a <br>

Escaping Characters

Escape special characters using backslash.

Markdown
\*Not italic\*
\# Not a heading
Output

*Not italic*
# Not a heading

Emoji

Insert emojis using shortcodes.

Markdown
:smile: :heart: :thumbsup:
Output

:smile: :heart: :thumbsup:

Tips
  • GitHub supports a wide range of emoji shortcodes

Frequently Asked Questions

What is Markdown?

Markdown is a lightweight markup language for creating formatted text using a plain-text editor. It was created by John Gruber in 2004 and is now one of the most popular markup languages in the world.

Is Markdown the same everywhere?

While core Markdown syntax is consistent across platforms, different platforms (GitHub, Discord, Obsidian, etc.) may support additional features or have slight variations. This is often called "flavored Markdown".

What can I use Markdown for?

Markdown is used for documentation, README files, blog posts, notes, emails, and more. It's supported by GitHub, GitLab, Reddit, Discord, Slack, Notion, Obsidian, and many other platforms.

Do I need special software to write Markdown?

No, you can write Markdown in any plain text editor. However, specialized Markdown editors like VS Code, Obsidian, or Typora provide live preview and additional features.

Related Tools