💻 Developer

Markdown Cheat Sheet
Everything You Need to Know

📅 April 2025 ⏱ 8 min read 💻 Developer

Markdown is a lightweight markup language that converts plain text to HTML. It's used in GitHub READMEs, documentation sites, Notion, Slack, Discord, and hundreds of other tools. Bookmark this page as your go-to reference.

1. Headings

Markdown
Result
# H1 Heading

H1 Heading

Use once per page — the main title
## H2 Heading

H2 Heading

Major sections
### H3 Heading

H3 Heading

Sub-sections
#### H4 Heading

H4 Heading

H4–H6 are rarely needed

Add a blank line before and after headings for compatibility across all Markdown parsers.

2. Bold, Italic & Strikethrough

Markdown
Result
**bold text**
bold text
Or use __double underscores__
*italic text*
italic text
Or use _single underscores_
***bold and italic***
bold and italic
~~strikethrough~~
strikethrough
GitHub Flavored Markdown (GFM) only
`inline code`
inline code
Also highlights code in most renderers

3. Lists

Unordered List — use -, *, or +
- Item one - Item two - Nested item - Another nested - Item three
  • Item one
  • Item two
    • Nested item
    • Another nested
  • Item three
Ordered List
1. First item 2. Second item 3. Third item
  1. First item
  2. Second item
  3. Third item

Indent nested list items by 2 or 4 spaces. The number you use in ordered lists doesn't matter — all parsers auto-increment from 1.

5. Code

Fenced Code Block (with syntax highlighting)
```javascript const greet = (name) => { return `Hello, ${name}!`; }; ```
const greet = (name) => {
  return `Hello, ${name}!`;
};
Language hint after opening ``` enables syntax highlighting in GitHub, VS Code docs, etc.

Common language hints: javascript, python, bash, sql, php, html, css, json, yaml

6. Blockquotes

Markdown
Result
> This is a blockquote
This is a blockquote
Use > to prefix each line
> Line one > Line two > > New paragraph
Line one
Line two

New paragraph
Blank > line creates paragraph break inside blockquote

7. Tables (GitHub Flavored Markdown)

| Name | Role | Score | |-------|---------|------:| | Alice | Admin | 100 | | Bob | Editor | 82 | | Carol | Viewer | 67 |
NameRoleScore
AliceAdmin100
BobEditor82
CarolViewer67
---: = right-align, :---: = center, :--- = left-align

8. Task Lists (GitHub Flavored Markdown)

Markdown
Result
- [x] Completed task - [ ] Incomplete task - [x] Another done item
  • ✅ Completed task
  • ⬜ Incomplete task
  • ✅ Another done item
Renders as interactive checkboxes in GitHub Issues and PRs

9. Horizontal Rules

Markdown
Result
--- or *** or ___

Three or more hyphens, asterisks, or underscores on their own line

10. Escaping Special Characters

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

Markdown
Result
\*not italic\*
*not italic*
\# Not a heading
# Not a heading
\[not a link\]
[not a link]

Characters that can be escaped: \ ` * _ { } [ ] ( ) # + - . !

Flavors: Standard Markdown (CommonMark) covers headings through blockquotes. Tables, task lists, and strikethrough are GitHub Flavored Markdown (GFM) extensions. Check your platform's documentation for extended syntax support.