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.
Frequently Asked Questions
Is Markdown a programming language?
No. Markdown is a lightweight markup language — it's a set of plain text conventions for adding formatting (like bold, headings, and lists) without needing HTML or a rich text editor. There are no variables, loops, or logic in standard Markdown.
What is the difference between Markdown and HTML?
Markdown is designed to be easy to read and write as plain text. It gets converted to HTML behind the scenes. Think of Markdown as a shorthand for common HTML elements: # Heading becomes <h1>Heading</h1>, **bold** becomes <strong>bold</strong>, and so on. HTML gives you pixel-level control; Markdown gives you simplicity and readability.
Why does my Markdown look different on GitHub vs Notion vs Reddit?
These platforms use different Markdown flavors (dialects). GitHub uses GFM (GitHub Flavored Markdown), which adds tables, task lists, and strikethrough. Notion has its own variant. Reddit recently switched from its own flavor to CommonMark. The core syntax (headings, bold, lists) works everywhere, but extended features may vary. When in doubt, stick to CommonMark syntax for maximum compatibility.
Do I need special software to write Markdown?
No — any text editor works. Markdown files are just plain text with the .md extension. Popular choices include VS Code, Obsidian, Notion, and even simple editors like Notepad or TextEdit. Many note-taking apps and documentation systems also support Markdown natively.
What file extension does Markdown use?
The standard extension is .md. You may also see .markdown (less common) or .mdx (which stands for Markdown + JSX, used in frameworks like Next.js and Gatsby to embed components inside Markdown).