Markdown Cheatsheet

A quick reference for all Markdown syntax — headings, emphasis, links, code blocks, tables, task lists, and more.

4 min read·Updated June 2026

This page is a quick reference for all standard Markdown syntax — from headings to task lists. Every example below is interactive: paste it directly into the Markdown Preview to see the rendered output. New to Markdown? Start with What is Markdown? first.

Headings

Use 1–6 hash characters followed by a space. The number of hashes sets the heading level.

MarkdownRendered as
# Heading 1Heading 1
## Heading 2Heading 2
### Heading 3Heading 3
#### Heading 4Heading 4

Text formatting

MarkdownResultNotes
**bold**boldAlso __bold__
*italic*italicAlso _italic_
***bold italic***bold italic
~~strikethrough~~strikethroughGFM extension
`inline code`inline code
==highlight==highlightNot all parsers

Links and images

MarkdownResult
[text](https://example.com)text
[text](url "tooltip")text with tooltip
<https://example.com>https://example.com (auto-link)
![alt text](image.png)🖼 image (alt text)
[![alt](img.png)](url)🖼 clickable image

Reference-style links: define [label]: url anywhere in the document and use [text][label] inline. Useful when the same URL appears multiple times.

Lists

Unordered
- Apple
- Banana
- Cherry
renders as
  • Apple
  • Banana
  • Cherry
Ordered
1. First
2. Second
3. Third
renders as
  1. First
  2. Second
  3. Third
Task list (GFM)
- [x] Done
- [ ] Todo
- [ ] Later
renders as
  • ✅ Done
  • ⬜ Todo
  • ⬜ Later
Nested
- Parent
  - Child
    - Grandchild
renders as
  • Parent
    • Child
      • Grandchild

Code

MarkdownResult
`inline code`inline code
```js … ```Fenced block with syntax highlighting
4-space indentAlso a code block (legacy style)
Fenced block — specify the language after the opening backticks:
```javascript
const greet = (name) => `Hello, ${name}!`
console.log(greet('World'))
```
Supported languages: js, ts, python, php, go, rust, java, c, cpp, bash, sql, html, css, yaml, json, and more.

Tables

Separate columns with |. The second row must be a separator with at least three dashes per cell.

| Name   | Type   | Required |
|--------|--------|----------|
| id     | number | yes      |
| email  | string | yes      |
| avatar | string | no       |

Add a colon to the separator to control alignment: :--- left · :---: center · ---: right.

Blockquotes and horizontal rules

MarkdownRenders as
> A blockquote
A blockquote
> Multi-line
> blockquote
Multi-line
blockquote
--- or ***

Escaping special characters

Prefix any Markdown character with a backslash to render it literally:

You typeYou get
\*not italic\**not italic*
\# not a heading# not a heading
\[not a link\][not a link]
\`not code\``not code`

Escapable characters: \ ` * _ { } [ ] ( ) # + - . !

Line breaks and paragraphs

New paragraph

Leave a blank line between two blocks of text. A single newline within a paragraph is treated as a space.

Hard line break

End a line with two or more spaces, then press Enter. Or use a backslash \ at the end of the line (most modern parsers support this).

Frequently asked questions