Markdown Cheat Sheet
Complete Markdown syntax reference with examples. Covers headings, lists, links, tables, code blocks, and GFM extensions.
49 elements
# Heading 1
→ <h1>Heading 1</h1>
## Heading 2
→ <h2>Heading 2</h2>
### Heading 3
→ <h3>Heading 3</h3>
#### Heading 4
→ <h4>Heading 4</h4>
##### Heading 5
→ <h5>Heading 5</h5>
###### Heading 6
→ <h6>Heading 6</h6>
Heading 1 =========
→ <h1>Heading 1</h1>
Setext-style, underline with = signs
Heading 2 ---------
→ <h2>Heading 2</h2>
Setext-style, underline with - signs
**bold text**
→ <strong>bold text</strong>
__bold text__
→ <strong>bold text</strong>
*italic text*
→ <em>italic text</em>
_italic text_
→ <em>italic text</em>
***bold italic***
→ <strong><em>bold italic</em></strong>
~~strikethrough~~
→ <del>strikethrough</del>
GFM extension
==highlighted==
→ <mark>highlighted</mark>
Not standard — supported by some parsers
H~2~O
→ H<sub>2</sub>O
Not standard — supported by some parsers
x^2^
→ x<sup>2</sup>
Not standard — supported by some parsers
- Item 1 - Item 2 - Item 3
→ <ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>
* Item 1 * Item 2
→ <ul><li>Item 1</li><li>Item 2</li></ul>
Can also use + as bullet
1. First 2. Second 3. Third
→ <ol><li>First</li><li>Second</li><li>Third</li></ol>
- Item 1 - Nested - Nested - Item 2
→ <ul><li>Item 1<ul><li>Nested</li><li>Nested</li></ul></li><li>Item 2</li></ul>
Indent with 2 spaces
- [x] Done - [ ] Todo - [ ] Todo
→ <ul><li>✅ Done</li><li>☐ Todo</li><li>☐ Todo</li></ul>
GFM extension
[link text](https://example.com)
→ <a href="https://example.com">link text</a>
[link text](https://example.com "Title")
→ <a href="https://example.com" title="Title">link text</a>
[link text][ref] [ref]: https://example.com
→ <a href="https://example.com">link text</a>
<https://example.com>
→ <a href="https://example.com">https://example.com</a>
<user@example.com>
→ <a href="mailto:user@example.com">user@example.com</a>

→ <img src="image.png" alt="alt text">

→ <img src="image.png" alt="alt text" title="Title">
![alt text][img-ref] [img-ref]: image.png
→ <img src="image.png" alt="alt text">
`inline code`
→ <code>inline code</code>
``` code here ```
→ <pre><code>code here</code></pre>
```javascript const x = 1; ```
→ <pre><code class="language-javascript">const x = 1;</code></pre>
Enables syntax highlighting
code here
→ <pre><code>code here</code></pre>
Indent with 4 spaces
> This is a quote
→ <blockquote>This is a quote</blockquote>
> Level 1 >> Level 2
→ <blockquote>Level 1<blockquote>Level 2</blockquote></blockquote>
> **Note:** Important info > > More text here.
→ <blockquote><strong>Note:</strong> Important info<br>More text here.</blockquote>
| Col 1 | Col 2 | |-------|-------| | A | B |
→ <table><tr><th>Col 1</th><th>Col 2</th></tr><tr><td>A</td><td>B</td></tr></table>
GFM extension
| Left | Center | Right | |:-----|:------:|------:| | L | C | R |
→ <table>Left-aligned, center-aligned, right-aligned columns</table>
Use : to set alignment
---
→ <hr>
***
→ <hr>
Can also use ___
Line 1 Line 2
→ Line 1<br>Line 2
Two trailing spaces before newline
Paragraph 1 Paragraph 2
→ <p>Paragraph 1</p><p>Paragraph 2</p>
Blank line between paragraphs
\*not italic\*
→ *not italic*
Backslash escapes: \ ` * _ { } [ ] ( ) # + - . !
<span style="color:red">red</span>
→ <span style="color:red">red</span>
Most parsers allow inline HTML
<!-- This is a comment -->
→ (hidden)
Not rendered in output
Text[^1] [^1]: Footnote content
→ Text<sup>1</sup> ... Footnote content
Supported by many parsers (not CommonMark)
Term : Definition
→ <dl><dt>Term</dt><dd>Definition</dd></dl>
Supported by some parsers (PHP Markdown Extra)
*[HTML]: HyperText Markup Language
→ <abbr title="HyperText Markup Language">HTML</abbr>
PHP Markdown Extra extension
What Is Markdown Cheat Sheet?
A complete, searchable Markdown syntax reference covering standard CommonMark, GitHub Flavored Markdown (GFM), and popular extensions. Each entry shows the raw syntax, the rendered HTML output, and any compatibility notes — so you can write Markdown confidently without memorizing every rule.
How to Use
- Search by element name or syntax keyword
- Filter by category (Headings, Lists, Code, etc.)
- Click the copy button to copy the syntax snippet
Features
- 49 Markdown elements across all categories
- Standard CommonMark + GFM extensions
- Rendered HTML output shown for each element
- Compatibility notes for non-standard extensions
- One-click copy for each syntax snippet
FAQ
What is the difference between CommonMark and GFM?
CommonMark is the standardized Markdown specification. GitHub Flavored Markdown (GFM) extends it with tables, task lists, strikethrough, and autolinks. Most modern platforms (GitHub, GitLab, VS Code) support GFM.
How do I add a line break without a new paragraph?
Add two trailing spaces at the end of a line before pressing Enter. This creates a <br> without starting a new paragraph. Alternatively, use a backslash \ at the end of the line (supported by some parsers).
Can I use HTML inside Markdown?
Yes, most Markdown parsers allow inline HTML. This is useful for elements Markdown doesn't support natively, like <sub>, <sup>, <kbd>, or custom styling. However, some platforms sanitize HTML for security.