Markdown Cheat Sheet: Complete Guide with Examples (2026)
Markdown is a lightweight markup language that lets you write formatted text using plain text syntax. It's used everywhere — from GitHub READMEs to documentation, blog posts, and technical writing.
This cheat sheet covers every essential Markdown syntax with examples you can copy and paste.
Headings
Use # symbols to create headings. More # symbols mean smaller headings.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Tip: It's best practice to start your document with an H1 (
#) and not skip heading levels.
Text Formatting
**Bold text** using double asterisks
__Bold text__ using double underscores
*Italic text* using single asterisks
_Italic text_ using single underscores
***Bold and italic*** using triple asterisks
~~Strikethrough~~ using double tildes
Result:
- Bold text using double asterisks
- Italic text using single asterisks
- Bold and italic using triple asterisks
Strikethroughusing double tildes
Links
[Link text](https://example.com)
[Link with title](https://example.com "Hover text")
Result: Link text
Images


Lists
Unordered Lists
- Item one
- Item two
- Nested item
- Another nested item
- Item three
* You can also use asterisks
+ Or plus signs
Ordered Lists
1. First step
2. Second step
3. Third step
1. Sub-step A
2. Sub-step B
Task Lists (GitHub Flavored)
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task to do
Code
Inline Code
Wrap text with single backticks:
Use `console.log()` to debug your code.
Result: Use console.log() to debug your code.
Fenced Code Blocks
Use triple backticks with an optional language identifier for syntax highlighting:
```javascript
function greet(name) {
return `Hello, ${name}!`;
}
console.log(greet("World"));
```
Common language identifiers: javascript, python, typescript, bash, json, html, css, sql, rust, go.
Indented Code Blocks
Indent by 4 spaces or one tab:
This is a code block
Each line is indented
Blockquotes
> This is a blockquote.
> It can span multiple lines.
> You can also nest blockquotes:
>
> > This is a nested blockquote.
Tables
| Syntax | Description |
| ----------- | ---------------------------- |
| Header | Title of the table |
| Paragraph | Body text |
| Bold | **Bold text** |
| Italic | *Italic text* |
| Right Aligned | Center Aligned | Left Aligned |
| ------------: | :------------: | :----------- |
| Column 1 | Column 2 | Column 3 |
Horizontal Rule
Use three or more hyphens, asterisks, or underscores:
---
***
___
Line Breaks
End a line with two or more spaces, or use a backslash:
First line. (two trailing spaces)
Second line.
First line.\
Second line.
Escape Characters
Use a backslash to display Markdown characters literally:
\*Not italic\*
\# Not a heading
\[Not a link\](not-a-link.com)
Quick Reference
| Element | Syntax |
|---|---|
| Heading | # Heading |
| Bold | **bold** |
| Italic | *italic* |
| Strikethrough | ~~text~~ |
| Link | [text](url) |
| Image |  |
| Unordered list | - item |
| Ordered list | 1. item |
| Task list | - [ ] item |
| Inline code | `code` |
| Code block | ```lang |
| Blockquote | > quote |
| Table | | col | |
| Horizontal rule | --- |
| Line break | two spaces |
Practice Online
Want to try these examples right now? Open our Markdown editor, paste any of the code snippets above, and see the formatted preview in real time. You can also export your practice document as PDF when you're ready.