Markdown Cheat Sheet
Complete markdown syntax reference with copy-paste examples. Quick lookup for formatting, tables, lists, links, code blocks, and LaTeX equations. Find exactly what you need instantly.
Filter by Tags
Markdown Quick Reference
The syntax you'll use 90% of the time. Select an element to jump to its full example, or practice it in the live markdown editor.
| Element | Markdown syntax |
|---|---|
| Heading | # H1
## H2
### H3 |
| Bold | **bold text** |
| Italic | *italic text* |
| Strikethrough | ~~crossed out~~ |
| Blockquote | > quoted text |
| Ordered list | 1. First item
2. Second item |
| Unordered list | - First item
- Second item |
| Task list | - [x] Done
- [ ] To do |
| Link | [title](https://example.com) |
| Image |  |
| Inline code | `code` |
| Code block | ```js
console.log('hi')
``` |
| Table | | Name | Role |
| ---- | ---- |
| Ada | Dev | |
| Horizontal rule | --- |
| Line break | End a line with two spaces, or use <br> |
| Math (LaTeX) | $E = mc^2$ |
| Escape a character | \*not italic\* |
Want it on your desk? Save this quick reference as a printable PDF. Writing tables by hand? The visual table builder writes the pipes and dashes for you.
Headings
Create headers using # symbols (1-6 levels) or underlines for main headers.
# Heading Level 1 ## Heading Level 2 ### Heading Level 3 #### Heading Level 4 ##### Heading Level 5 ###### Heading Level 6 Alternative Level 1 ================== Alternative Level 2 ------------------
Text Emphasis
Add emphasis with bold, italic, and combined formatting.
**Bold text** or __Bold text__ *Italic text* or _Italic text_ ***Bold and italic*** or ___Bold and italic___ **Bold text with _italic_ inside** *Italic text with **bold** inside*
Bold text or Bold text Italic text or Italic text Bold and italic or Bold and italic Bold text with italic inside Italic text with bold inside
Strikethrough Text
Strike through text using double tildes.
~~Strikethrough text~~ Regular text with ~~strikethrough~~ words Price: ~~$99.99~~ **$79.99** Task list: ~~completed task~~ โ
Strikethrough text
Regular text with strikethrough words
Price: ~~79.99**
Task list: completed task โ
Paragraphs and Line Breaks
Control text flow with paragraphs and line breaks.
First paragraph text. Second paragraph text with no break in rendered output. Line with two spaces at endโ Next line starts here. Line with backslash\ Next line starts here.
First paragraph text.
Second paragraph text with no break in rendered output.
Line with two spaces at endโ
Next line starts here.
Line with backslash
Next line starts here.
Blockquotes
Add single-line or multi-line quote blocks.
> Single line quote > Multi-line quote > continues here > > Nested quote > > goes deeper > > Back to first level
Single line quote
Multi-line quote continues here
Nested quote goes deeper
Back to first level
Special Characters and Escaping
Display special characters and symbols in Markdown.
\* Not italic \*
\# Not a heading
\[Not a link\]
\> Not a quote
Escapable characters:
\ ` * _ {} [] () # + - . ! |
Copyright symbol: ยฉ
Registered trademark: ยฎ
Euro symbol: โฌ* Not italic * # Not a heading [Not a link] > Not a quote
Escapable characters: \ ` * _ {} [] () # + - . ! |
Copyright symbol: ยฉ Registered trademark: ยฎ Euro symbol: โฌ
Inline Spoilers
Hide text with spoilers for platforms like Discord or GitHub.
||Hidden spoiler text|| Regular text with ||spoiler|| inside
||Hidden spoiler text|| Regular text with ||spoiler|| inside
Unordered Lists
Create bullet lists using asterisks, plus signs, or hyphens.
* First level item
* Another item
* Second level item
* Another nested item
* Third level item
* Back to first level
+ Alternative bullet
- Another alternative
* Mixed indentation
+ Second level
- Third level- First level item
- Another item
- Second level item
- Another nested item
- Third level item
- Back to first level
- Alternative bullet
- Another alternative
- Mixed indentation
- Second level
- Third level
- Second level
Ordered Lists
Create numbered lists with automatic or manual numbering.
1. First item 2. Second item 1. Nested item one 2. Nested item two 3. Third item 1. Numbers can be 1. Any number and still 1. Display correctly Manual numbering: 1. First 2. Second 2.1. Sub-item 2.2. Another sub-item 3. Third
-
First item
-
Second item
- Nested item one
- Nested item two
-
Third item
-
Numbers can be
-
Any number and still
-
Display correctly
Manual numbering:
- First
- Second 2.1. Sub-item 2.2. Another sub-item
- Third
Task Lists
Create interactive checklists with checkboxes.
- [x] Completed task
- [ ] Pending task
- [x] Completed subtask
- [ ] Pending subtask
- [x] Another completed item
* [x] Alternative syntax
* [ ] For task lists
* [x] Nested completion-
Completed task
- Pending task
- Completed subtask
- Pending subtask
- Another completed item
- Alternative syntax
- For task lists
- Nested completion
- Pending task
Definition Lists
Create term and definition pairs.
Term 1 : First definition : Another definition Term 2 : Single definition Complex Term : First line of definition continues on next line : Second definition
Term 1 : First definition : Another definition
Term 2 : Single definition
Complex Term : First line of definition continues on next line : Second definition
Basic Tables
Create simple tables with basic alignment.
| Header 1 | Header 2 | Header 3 | |----------|-----------|-----------| | Cell 1 | Cell 2 | Cell 3 | | Row 2 | Data | Data | Simple Tables: Header 1 | Header 2 ---------|---------- Cell 1 | Cell 2 Cell 3 | Cell 4
| Header 1 | Header 2 | Header 3 |
|---|---|---|
| Cell 1 | Cell 2 | Cell 3 |
| Row 2 | Data | Data |
Simple Tables:
| Header 1 | Header 2 |
|---|---|
| Cell 1 | Cell 2 |
| Cell 3 | Cell 4 |
Advanced Tables
Create tables with alignment and formatting.
| Left | Center | Right | |:-----|:------:|------:| |Left |Center |Right | |Text |Text |Text | | Item | Description | Price | |:-----|:------------|------:| | Item1 | **Bold** description | $10.00 | | Item2 | *Italic* description | $15.00 | | Item3 | ~~Strike~~ price | $20.00 |
| Left | Center | Right |
|---|---|---|
| Left | Center | Right |
| Text | Text | Text |
| Item | Description | Price |
|---|---|---|
| Item1 | Bold description | $10.00 |
| Item2 | Italic description | $15.00 |
| Item3 | $20.00 |
Complex Tables
Create tables with spans and formatting.
| Feature | Basic | Pro | Enterprise | |---------|:-----:|:---:|:----------:| | Storage | 10 GB โก | 100 GB ๐ | Unlimited ๐ซ | | **Users** | 1 | 10 | Unlimited | | *Speed* | Standard | Fast | Fastest | | Support | โ | โ | โ | | Custom Theme | โ | โ | โ | Table with multi-line content: | Header 1 | Header 2 | |----------|----------| | First line\n Second line | Single line | | Single | Multi-line\n content |
| Feature | Basic | Pro | Enterprise |
|---|---|---|---|
| Storage | 10 GB โก | 100 GB ๐ | Unlimited ๐ซ |
| Users | 1 | 10 | Unlimited |
| Speed | Standard | Fast | Fastest |
| Support | โ | โ | โ |
| Custom Theme | โ | โ | โ |
Table with multi-line content:
| Header 1 | Header 2 |
|---|---|
| First line\n Second line | Single line |
| Single | Multi-line\n content |
Tables with LaTeX
Combine tables with LaTeX equations for scientific data.
| Variable | Formula | Value |
|:---------|:--------|------:|
| Energy | $E = mc^2$ | 9.0 ร 10^16 J |
| Force | $F = ma$ | 100 N |
| Sum | $$\sum_{i=1}^n i$$ | 5050 || Variable | Formula | Value |
|---|---|---|
| Energy | 9.0 ร 10^16 J | |
| Force | 100 N | |
| Sum | 5050 |
Basic Links
Create various types of links and URLs.
[Basic Link](https://example.com) [Link with Title](https://example.com "Website Title") [Reference Link][ref] [ref]: https://example.com <https://example.com> <user@example.com> Plain URL: https://example.com
Images
Insert and format images in Markdown.
  [](https://markdownlivepreview.dev) [Reference style][logo] [logo]: image.png "Logo Title" <img src="image.png" width="200" height="100" alt="Sized image"> <img src="image.png" style="float: right" alt="Floating image">
Basic Code
Display inline code and basic code blocks.
Inline `code` in text
```
Basic code block
No syntax highlighting
Multiple lines
```
Indented code block
4 spaces or 1 tab
Preserves whitespaceInline code in text
Basic code block
No syntax highlighting
Multiple lines
Indented code block
4 spaces or 1 tab
Preserves whitespace
Syntax Highlighted Code
Code blocks with language-specific highlighting.
```javascript
// JavaScript Example
function greeting(name) {
return `Hello, ${name}!`;
}
const result = greeting('World');
console.log(result);
```
```python
# Python Example
def fibonacci(n):
a, b = 0, 1
while a < n:
print(a, end=' ')
a, b = b, a + b
```
```css
/* CSS Example */
.container {
display: flex;
justify-content: center;
align-items: center;
}
```// JavaScript Examplefunction greeting(name) {return `Hello, ${name}!`;}const result = greeting('World');console.log(result);
# Python Exampledef fibonacci(n):a, b = 0, 1while a < n:print(a, end=' ')a, b = b, a + b
/* CSS Example */.container {display: flex;justify-content: center;align-items: center;}
HTML Code Block
Display HTML code with syntax highlighting.
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Page</title>
</head>
<body>
<h1>Welcome</h1>
<p>This is a paragraph.</p>
</body>
</html>
```<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>My Page</title></head><body><h1>Welcome</h1><p>This is a paragraph.</p></body></html>
SQL Code Block
Display SQL queries with syntax highlighting.
```sql SELECT first_name, last_name, email FROM users WHERE active = true ORDER BY last_name ASC LIMIT 10; ```
SELECT first_name, last_name, emailFROM usersWHERE active = trueORDER BY last_name ASCLIMIT 10;
Math and Equations
Write mathematical equations using LaTeX syntax.
Inline equation: $E = mc^2$
Block equation:
$$
\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$
System of equations:
$$
\begin{cases}
x + y = 10 \\
2x - y = 5
\end{cases}
$$
Matrix:
$$
\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}
$$Inline equation:
Block equation:
System of equations:
Matrix:
Advanced LaTeX Equations
Use LaTeX for complex mathematical expressions like integrals and limits.
Integral: $$\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}$$
Limit: $$\lim_{x \to \infty} \frac{1}{x} = 0$$
Greek symbols: $$\alpha + \beta = \gamma$$
Summation: $$\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}$$Integral:
Limit:
Greek symbols:
Summation:
GitHub Specific Features
Special Markdown features for GitHub.
- [x] Task list item - [ ] Open task - [x] Completed task ```diff - removed line + added line ``` > **Note** > Special callout syntax > **Warning** > Warning callout <!-- This is a comment --> ```yaml name: CI on: [push] ```
- Task list item
- Open task
- Completed task
- removed line+ added line
Note Special callout syntax
Warning Warning callout
name: CIon: [push]
Special Containers
Create special content containers and callouts.
:::note This is a note container Multiple lines supported ::: :::warning Warning container With multiple lines ::: :::danger Danger container Important warning ::: :::info Information container With details ::: > **๐ก Tip:** Special tip callout > With multiple lines > **โ ๏ธ Warning:** Warning callout > With details
This is a note container Multiple lines supported
Warning container With multiple lines
Danger container Important warning
Information container With details
๐ก Tip: Special tip callout With multiple lines
โ ๏ธ Warning: Warning callout With details
Advanced HTML Integration
Combine HTML with Markdown for advanced formatting.
<details> <summary>Click to expand</summary> - Markdown inside - HTML container - **Mixed** formatting </details> <div align="center"> # Centered Heading Centered paragraph </div> <kbd>Ctrl</kbd> + <kbd>C</kbd> <mark>Highlighted text</mark> <sup>Superscript</sup> and <sub>subscript</sub>
Click to expand
- Markdown inside
- HTML container
- Mixed formatting
Centered paragraph
Ctrl + C
Highlighted text
Superscript and subscript
Subscript and Superscript
Format text as subscript or superscript using HTML or LaTeX.
HTML subscript: H<sub>2</sub>O HTML superscript: x<sup>2</sup> LaTeX subscript: $x_1$ LaTeX superscript: $x^2$
HTML subscript: H2O HTML superscript: x2
LaTeX subscript: LaTeX superscript:
README File Creation
Create professional README files for projects.
# Project Name [](https://github.com/digitalpro/markdownlivepreview/actions) [](https://www.npmjs.com/package/project) ## Getting Started ```bash npm install my-project npm start ``` ## Features โจ Feature 1 ๐ Feature 2 ๐ซ Feature 3 ## Documentation See our [cheat sheet guide](/cheatsheet) for Markdown syntax ## Contributing Please read [CONTRIBUTING.md](CONTRIBUTING.md) ## License MIT ยฉ [Your Name]
npm install my-projectnpm start
โจ Feature 1 ๐ Feature 2 ๐ซ Feature 3
See our cheat sheet guide for Markdown syntax
Please read CONTRIBUTING.md
MIT ยฉ [Your Name]
Blog Post Writing
Format blog posts using Markdown.
---
title: "Blog Post Title"
date: 2024-01-01
author: "Your Name"
tags: ["tech", "tutorial"]
---
# Eye-catching Title

## Introduction
Engaging opening paragraph...
### Key Points
1. First point with **emphasis**
2. Second point with *style*
> Quotable highlight text
## Code Example
```python
def example():
print("Hello, readers!")
```
### Summary
Key takeaways...
---
*Originally published at [blog.com](https://blog.com)*
Engaging opening paragraph...
- First point with emphasis
- Second point with style
Quotable highlight text
def example():print("Hello, readers!")
Key takeaways...
Originally published at blog.com
Resume and CV
Create professional resumes using Markdown.
# John Doe ## Senior Software Engineer > [john@email.com](mailto:john@email.com) | > [LinkedIn](https://linkedin.com/in/johndoe) | > [GitHub](https://github.com/johndoe) ## Experience ### Senior Software Engineer **Tech Company** *(2020 - Present)* - Led team of 5 developers - Implemented key features - Reduced system latency by 40% ### Software Engineer **Previous Company** *(2018 - 2020)* - Developed core functionalities - Collaborated with product team ## Skills ``` Languages: JavaScript, Python, Java Frameworks: React, Node.js, Django Tools: Git, Docker, AWS ```
Tech Company (2020 - Present)
- Led team of 5 developers
- Implemented key features
- Reduced system latency by 40%
Previous Company (2018 - 2020)
- Developed core functionalities
- Collaborated with product team
Languages: JavaScript, Python, Java
Frameworks: React, Node.js, Django
Tools: Git, Docker, AWS
Technical Documentation
Advanced technical documentation features.
# Technical Documentation
## LaTeX Math
$$
\begin{align*}
E &= mc^2 \\
F &= ma
\end{align*}
$$
## API Documentation
```typescript
interface User {
id: string; // Unique identifier
name: string; // User's full name
role: Role; // User's role enum
}
```interface User {id: string; // Unique identifiername: string; // User's full namerole: Role; // User's role enum}
Academic Writing
Academic and research writing in Markdown.
# Research Paper Title
## Abstract
Research summary...
## Introduction
### Background
Background information...
### Literature Review
Previous research...
## Methodology
### Research Design
- Data collection
- Analysis
- Results
### Data Analysis
$$
\chi^2 = \sum\frac{(O_i-E_i)^2}{E_i}
$$
## Results
| Variable | Group A | Group B |
|----------|---------|---------|
| X | 10.5 | 11.2 |
| Y | 20.1 | 19.8 |
## References
[^1]: Author, A. (2023). Title...
[^2]: Author, B. (2024). Title...Research summary...
Background information...
Previous research...
- Data collection
- Analysis
- Results
| Variable | Group A | Group B |
|---|---|---|
| X | 10.5 | 11.2 |
| Y | 20.1 | 19.8 |
API Documentation
Document APIs using Markdown.
# API Documentation
## Authentication
```http
Authorization: Bearer <token>
```
## Endpoints
### GET /api/users
Retrieve users list.
#### Parameters
| Name | Type | Description |
|------|------|-------------|
| page | number | Page number |
| limit | number | Items per page |
#### Response
```json
{
"users": [],
"total": 100
}
```
### POST /api/users
Create new user.
#### Request Body
```typescript
interface CreateUser {
name: string;
email: string;
}
```
#### Error Codes
| Code | Description |
|------|-------------|
| 400 | Bad Request |
| 401 | Unauthorized |Authorization: Bearer <token>
Retrieve users list.
| Name | Type | Description |
|---|---|---|
| page | number | Page number |
| limit | number | Items per page |
{"users": [],"total": 100}
Create new user.
interface CreateUser {name: string;email: string;}
| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
Markdown to PDF Conversion
Methods and tools for converting Markdown to PDF format.
# Converting Markdown to PDF
## Built-in Tools
Use our **Markdown to PDF** tool in the Tools menu.
## Alternative Methods
- Pandoc: `pandoc file.md -o file.pdf`
- Prince: Online converter with CSS styling
- wkhtmltopdf: Command-line HTML to PDF
- Browser: File โ Print โ Save as PDF
## CSS Styling for PDF
```css
@media print {
body { font-family: serif; }
h1 { page-break-before: always; }
}
```
Try our online **Markdown to PDF converter** for instant results.Use our Markdown to PDF tool in the Tools menu.
- Pandoc:
pandoc file.md -o file.pdf - Prince: Online converter with CSS styling
- wkhtmltopdf: Command-line HTML to PDF
- Browser: File โ Print โ Save as PDF
@media print {body { font-family: serif; }h1 { page-break-before: always; }}
Try our online Markdown to PDF converter for instant results.
Markdown File Management
Working with .md files and file operations.
# Working with Markdown Files ## File Extensions - `.md` - Standard Markdown - `.markdown` - Alternative extension - `.mdown` - Another variant - `.mkd` - Short variant ## File Operations ### Creating Files ```bash touch README.md echo "# My Project" > README.md ``` ### File Structure ``` project/ โโโ README.md โโโ docs/ โ โโโ api.md โ โโโ guide.md โโโ src/ ``` Use our **file upload** feature to work with existing .md files.
.md- Standard Markdown.markdown- Alternative extension.mdown- Another variant.mkd- Short variant
touch README.mdecho "# My Project" > README.md
project/
โโโ README.md
โโโ docs/
โ โโโ api.md
โ โโโ guide.md
โโโ src/
Use our file upload feature to work with existing .md files.
Markdown Editor Features
Essential features to look for in Markdown editors.
# Markdown Editor Features ## Essential Features - [x] **Live Preview** - Real-time rendering - [x] **Syntax Highlighting** - Color-coded syntax - [x] **Split View** - Side-by-side editing - [x] **Export Options** - PDF, HTML, Word - [x] **File Management** - Upload/download support ## Advanced Features - [ ] Table editing assistance - [ ] Math equation support (LaTeX) - [ ] Diagram support (Mermaid) - [ ] Collaboration tools - [ ] Version control integration ## Our Editor **MarkdownLivePreview.dev** includes: โ Live preview โ File upload โ PDF export โ LaTeX math โ Table generator โ Free to use Try our **online markdown editor** now!
- Live Preview - Real-time rendering
- Syntax Highlighting - Color-coded syntax
- Split View - Side-by-side editing
- Export Options - PDF, HTML, Word
- File Management - Upload/download support
- Table editing assistance
- Math equation support (LaTeX)
- Diagram support (Mermaid)
- Collaboration tools
- Version control integration
MarkdownLivePreview.dev includes: โ Live preview โ File upload โ PDF export โ LaTeX math โ Table generator โ Free to use
Try our online markdown editor now!
Markdown Syntax Quick Reference
Most commonly used Markdown syntax at a glance.
# Markdown Syntax Quick Reference ## Text Formatting `**bold**` โ **bold** `*italic*` โ *italic* `~~strike~~` โ ~~strike~~ ## Headers `# H1` โ # Header 1 `## H2` โ ## Header 2 `### H3` โ ### Header 3 ## Lists `- item` โ โข item `1. item` โ 1. item `- [ ] task` โ โ task ## Links & Images `[text](url)` โ [text](url) `` โ image ## Code ``code`` โ `code` ```python` โ code block Perfect for quick lookups and syntax checking!
**bold** โ bold
*italic* โ italic
~~strike~~ โ strike
# H1 โ # Header 1
## H2 โ ## Header 2
### H3 โ ### Header 3
- item โ โข item
1. item โ 1. item
- [ ] task โ โ task
[text](url) โ text
 โ image
code โ code
```python` โ code block
Perfect for quick lookups and syntax checking!
Markdown Table Generator Guide
Creating and formatting tables efficiently.
# Markdown Table Creation ## Basic Table ``` | Header 1 | Header 2 | |----------|----------| | Cell 1 | Cell 2 | ``` ## Table with Alignment ``` | Left | Center | Right | |:-----|:------:|------:| | L | C | R | ``` ## Pro Tips - Use our **Table Generator** tool for complex tables - Align pipes for better readability - Test in live preview before finalizing ## Common Patterns | Use Case | Syntax | |----------|--------| | Product comparison | Features in rows | | Data display | Numbers right-aligned | | Status tracking | Center-align status | Try our **markdown table generator** for instant table creation!
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
| Left | Center | Right |
|:-----|:------:|------:|
| L | C | R |
- Use our Table Generator tool for complex tables
- Align pipes for better readability
- Test in live preview before finalizing
| Use Case | Syntax |
|---|---|
| Product comparison | Features in rows |
| Data display | Numbers right-aligned |
| Status tracking | Center-align status |
Try our markdown table generator for instant table creation!
Markdown Formatting Examples
Complete formatting examples for common use cases.
# Markdown Formatting Examples
## Text Styles
**Bold text** for emphasis
*Italic text* for subtle emphasis
~~Strikethrough~~ for corrections
`Inline code` for technical terms
## Document Structure
# Main Title
## Section Header
### Subsection
#### Minor Section
## Lists and Tasks
- [x] Completed task
- [ ] Pending task
- Regular bullet point
1. First step
2. Second step
3. Final step
## Quotes and Code
> "Markdown makes writing for the web fast and easy."
```javascript
function hello() {
console.log("Hello, Markdown!");
}
```
Perfect examples for learning **markdown formatting**!Bold text for emphasis
Italic text for subtle emphasis
Strikethrough for corrections
Inline code for technical terms
- Completed task
- Pending task
- Regular bullet point
- First step
- Second step
- Final step
"Markdown makes writing for the web fast and easy."
function hello() {console.log("Hello, Markdown!");}
Perfect examples for learning markdown formatting!