Markdown Cheat Sheet 2026: Every Syntax You Need
Essential Markdown Syntax
Markdown is designed to be readable as-is while converting to beautiful formatted text. This comprehensive reference covers everything from basic formatting to advanced techniques used in 2026.
Headers
Use hash symbols for different heading levels:
# H1 - Main Title
## H2 - Section Heading
### H3 - Subsection
#### H4 - Minor Heading
##### H5 - Fine Detail
###### H6 - Smallest Heading
Best practice: Skip heading levels sparingly. Go from H1 to H2, not H1 to H3.
Alternative syntax (for H1 and H2 only):
Main Title
==========
Section Heading
---------------
Text Formatting
Basic Emphasis
*italic text* or _italic text_
**bold text** or __bold text__
***bold and italic*** or ___bold and italic___
~~strikethrough text~~
Advanced Text Formatting
Regular text with **bold words** and *italic emphasis* in the middle.
You can combine formatting: ***very important*** or **bold with *nested italic***.
For ==highlighted text== (supported in some renderers).
Text with ^superscript^ and ~subscript~ (limited support).
Lists
Unordered Lists
- First item
- Second item
- Third item
- Nested item
- Another nested item
- Deep nested item
* Alternative syntax
* Using asterisks
* Also works
+ Plus signs
+ Work too
+ But stick to one style
Ordered Lists
1. First item
2. Second item
3. Third item
1. Nested numbered item
2. Another nested item
1. You can use any numbers
5. The actual numbers don't matter
2. Markdown will renumber automatically
Task Lists (GitHub-flavored)
- [x] Completed task
- [ ] Incomplete task
- [ ] Another incomplete task
- [x] Nested completed task
- [ ] Nested incomplete task
Links and Images
Links
[Link text](https://example.com)
[Link with title](https://example.com "Link title on hover")
[Reference-style link][reference-id]
[Another reference link][another-ref]
[reference-id]: https://example.com "Optional title"
[another-ref]: https://another-example.com
Automatic links: <https://example.com>
Email links: <email@example.com>
Images


![Reference-style image][image-ref]
[image-ref]: path/to/image.jpg "Optional title"
<!-- Image with link -->
[](https://link-destination.com)
Link Best Practices
- Always include descriptive alt text for images
- Use meaningful link text, not "click here"
- Test links after conversion to ensure they remain clickable
Code
Inline Code
Use backticks for `inline code` within sentences.
For code with backticks, use double backticks: ``code with `backtick```
Code Blocks
Fenced code blocks:
Basic code block No syntax highlighting
```javascript
// JavaScript with syntax highlighting
function greet(name) {
return `Hello, ${name}!`;
}
# Python example
def calculate_total(items):
return sum(item.price for item in items)
**Indented code blocks**:
```markdown
// Indent with 4 spaces for code
function example() {
return "This is code";
}
Popular Language Codes
javascriptorjspythonorpyhtmlcssbashorshelljsonsqlyamlmarkdownormd
Tables
Basic Table Structure
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Row 1 | Data | More data|
| Row 2 | Data | More data|
Table Alignment
| Left Aligned | Center Aligned | Right Aligned |
|:-------------|:--------------:|--------------:|
| Left | Center | Right |
| Text | Text | Text |
Complex Tables
| Feature | Free Plan | Pro Plan | Enterprise |
|---------|:---------:|:--------:|:----------:|
| Users | 1 | 5 | Unlimited |
| Storage | 1GB | 10GB | 1TB |
| Support | Email | Priority | Phone |
| Price | $0/month | $9/month | Custom |
Table Tips
- Pipes don't need to align perfectly (but it's more readable if they do)
- Use formatting within cells: bold, italic,
code - Keep tables simple for best conversion results
- Very wide tables may not display well on mobile
Blockquotes
Basic Blockquotes
> This is a blockquote.
> It can span multiple lines.
> You can also use blockquotes
> for longer passages of text
> that you want to highlight.
Nested Blockquotes
> This is the first level of quoting.
>
>> This is nested blockquote.
>
> Back to the first level.
Blockquotes with Other Elements
> ## Quote with Header
>
> This blockquote contains:
> - A list item
> - Another list item
>
> And even `code` or **bold text**.
Horizontal Rules
Create dividers with three or more symbols:
---
***
___
<!-- All three create the same horizontal line -->
Line Breaks and Paragraphs
Paragraphs
This is a paragraph.
This is another paragraph (separated by blank line).
This is a third paragraph.
Line Breaks
First line with two spaces at the end
Second line (hard break)
First line with backslash\
Second line (alternative hard break)
First line without spaces
Second line (no break, same paragraph)
Advanced Syntax
Footnotes (Extended Markdown)
Here's a sentence with a footnote[^1].
[^1]: This is the footnote content.
You can also use named footnotes[^note-name].
[^note-name]: Named footnotes are more descriptive.
Definition Lists (Extended Markdown)
Term 1
: Definition 1
Term 2
: Definition 2a
: Definition 2b
Tables of Contents
Many markdown processors support automatic TOC generation:
## Table of Contents
- [Headers](#headers)
- [Text Formatting](#text-formatting)
- [Lists](#lists)
- [Links and Images](#links-and-images)
Escaping Characters
Use backslash to escape special characters:
\*literal asterisks\*
\[literal square brackets\]
\# literal hash symbol
\\ literal backslash
Characters that can be escaped: \ ` * _ { } [ ] ( ) # + - . ! |
HTML in Markdown
Markdown allows HTML for advanced formatting:
<div align="center">
<strong>Centered bold text</strong>
</div>
<details>
<summary>Click to expand</summary>
Hidden content goes here.
</details>
<kbd>Ctrl</kbd> + <kbd>C</kbd> for keyboard shortcuts
<mark>Highlighted text</mark> (if supported)
Platform-Specific Extensions
GitHub Flavored Markdown (GFM)
- Task lists:
- [x] Done - Tables with alignment
- Strikethrough:
~~text~~ - Automatic URL linking
- Emoji shortcuts:
:smile:becomes 😊
Mermaid Diagrams (GitHub, GitLab)
```mermaid
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
### Math Expressions (Extended)
```markdown
Inline math: $x^2 + y^2 = z^2$
Block math:
$$
\frac{n!}{k!(n-k)!} = \binom{n}{k}
$$
Common Gotchas and Edge Cases
Spacing Issues
<!-- Wrong: No space after hash -->
#Header
<!-- Right: Space required -->
# Header
<!-- Wrong: No blank line before list -->
Paragraph text
- List item
<!-- Right: Blank line separates elements -->
Paragraph text
- List item
Nested Lists with Paragraphs
1. First item
This paragraph belongs to item 1.
2. Second item
- Nested list item
This paragraph belongs to the nested item.
- Another nested item
3. Third item
Code in Lists
1. Install the package:
```bash
npm install package-name
-
Import in your code:
import package from 'package-name';
## Conversion Best Practices
When converting markdown to rich text:
1. **Test your output**: Different converters handle edge cases differently
2. **Keep it simple**: Complex nested structures may not convert cleanly
3. **Use consistent patterns**: Stick to one style for lists, headers, etc.
4. **Validate links**: Ensure links remain clickable after conversion
5. **Check table formatting**: Tables often need manual adjustment
## Quick Reference Card
**Headers**: `# ## ###`
**Bold**: `**text**`
**Italic**: `*text*`
**Code**: ``text``
**Links**: `[text](url)`
**Images**: ``
**Lists**: `- item` or `1. item`
**Quotes**: `> quote`
**Tables**: `| col | col |`
**Rules**: `---`
This reference covers the full spectrum of markdown syntax you'll encounter in 2026. Bookmark it for quick reference, and remember: when in doubt, keep it simple. The best markdown is readable both as source and when converted.
Frequently Asked Questions
What's the difference between standard Markdown and GitHub Flavored Markdown?
GitHub Flavored Markdown (GFM) extends standard Markdown with features like tables, task lists, strikethrough text, and automatic URL linking. Most modern markdown processors support these extensions.
Why don't my tables display correctly after converting?
Table conversion can vary between tools. Make sure your markdown table syntax is correct (proper pipes and header separators), and you may need to adjust borders and spacing in the target application after pasting.
Can I use HTML tags directly in markdown?
Yes, most markdown processors allow HTML tags for advanced formatting. However, when converting to rich text for applications like Word or Google Docs, complex HTML may not render as expected.
Ready to Convert Your Markdown?
Transform your markdown into rich text that pastes perfectly into Google Docs, Word, and other applications.
Convert Markdown Now →