T
DataToolings

Markdown Cheat Sheet

Complete Markdown syntax reference with examples. Covers headings, lists, links, tables, code blocks, and GFM extensions.

49 elements

Heading 1Headings
# Heading 1

<h1>Heading 1</h1>

Heading 2Headings
## Heading 2

<h2>Heading 2</h2>

Heading 3Headings
### Heading 3

<h3>Heading 3</h3>

Heading 4Headings
#### Heading 4

<h4>Heading 4</h4>

Heading 5Headings
##### Heading 5

<h5>Heading 5</h5>

Heading 6Headings
###### Heading 6

<h6>Heading 6</h6>

Alt Heading 1Headings
Heading 1
=========

<h1>Heading 1</h1>

Setext-style, underline with = signs

Alt Heading 2Headings
Heading 2
---------

<h2>Heading 2</h2>

Setext-style, underline with - signs

BoldEmphasis
**bold text**

<strong>bold text</strong>

Bold (alt)Emphasis
__bold text__

<strong>bold text</strong>

ItalicEmphasis
*italic text*

<em>italic text</em>

Italic (alt)Emphasis
_italic text_

<em>italic text</em>

Bold + ItalicEmphasis
***bold italic***

<strong><em>bold italic</em></strong>

StrikethroughEmphasis
~~strikethrough~~

<del>strikethrough</del>

GFM extension

HighlightEmphasis
==highlighted==

<mark>highlighted</mark>

Not standard — supported by some parsers

SubscriptEmphasis
H~2~O

H<sub>2</sub>O

Not standard — supported by some parsers

SuperscriptEmphasis
x^2^

x<sup>2</sup>

Not standard — supported by some parsers

Unordered ListLists
- Item 1
- Item 2
- Item 3

<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li></ul>

Unordered List (alt)Lists
* Item 1
* Item 2

<ul><li>Item 1</li><li>Item 2</li></ul>

Can also use + as bullet

Ordered ListLists
1. First
2. Second
3. Third

<ol><li>First</li><li>Second</li><li>Third</li></ol>

Nested ListLists
- 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

Task ListLists
- [x] Done
- [ ] Todo
- [ ] Todo

<ul><li>✅ Done</li><li>☐ Todo</li><li>☐ Todo</li></ul>

GFM extension

Inline LinkLinks
[link text](https://example.com)

<a href="https://example.com">link text</a>

Link with TitleLinks
[link text](https://example.com "Title")

<a href="https://example.com" title="Title">link text</a>

Reference LinkLinks
[link text][ref]

[ref]: https://example.com

<a href="https://example.com">link text</a>

Auto LinkLinks
<https://example.com>

<a href="https://example.com">https://example.com</a>

Email LinkLinks
<user@example.com>

<a href="mailto:user@example.com">user@example.com</a>

ImageImages
![alt text](image.png)

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

Image with TitleImages
![alt text](image.png "Title")

<img src="image.png" alt="alt text" title="Title">

Reference ImageImages
![alt text][img-ref]

[img-ref]: image.png

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

Inline CodeCode
`inline code`

<code>inline code</code>

Code Block (fenced)Code
```
code here
```

<pre><code>code here</code></pre>

Code Block with LanguageCode
```javascript
const x = 1;
```

<pre><code class="language-javascript">const x = 1;</code></pre>

Enables syntax highlighting

Indented Code BlockCode
    code here

<pre><code>code here</code></pre>

Indent with 4 spaces

BlockquoteBlockquotes
> This is a quote

<blockquote>This is a quote</blockquote>

Nested BlockquoteBlockquotes
> Level 1
>> Level 2

<blockquote>Level 1<blockquote>Level 2</blockquote></blockquote>

Blockquote with ContentBlockquotes
> **Note:** Important info
>
> More text here.

<blockquote><strong>Note:</strong> Important info<br>More text here.</blockquote>

Basic TableTables
| 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

Aligned TableTables
| Left | Center | Right |
|:-----|:------:|------:|
| L    |   C    |     R |

<table>Left-aligned, center-aligned, right-aligned columns</table>

Use : to set alignment

Horizontal RuleDividers
---

<hr>

Horizontal Rule (alt)Dividers
***

<hr>

Can also use ___

Line BreakLine Breaks
Line 1  
Line 2

Line 1<br>Line 2

Two trailing spaces before newline

Paragraph BreakLine Breaks
Paragraph 1

Paragraph 2

<p>Paragraph 1</p><p>Paragraph 2</p>

Blank line between paragraphs

Escape CharacterEscaping
\*not italic\*

*not italic*

Backslash escapes: \ ` * _ { } [ ] ( ) # + - . !

Inline HTMLHTML
<span style="color:red">red</span>

<span style="color:red">red</span>

Most parsers allow inline HTML

HTML CommentHTML
<!-- This is a comment -->

(hidden)

Not rendered in output

FootnoteExtensions
Text[^1]

[^1]: Footnote content

Text<sup>1</sup> ... Footnote content

Supported by many parsers (not CommonMark)

Definition ListExtensions
Term
: Definition

<dl><dt>Term</dt><dd>Definition</dd></dl>

Supported by some parsers (PHP Markdown Extra)

AbbreviationExtensions
*[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

  1. Search by element name or syntax keyword
  2. Filter by category (Headings, Lists, Code, etc.)
  3. 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.