Skip to content

Markdown Cheat Sheet

Last verified May 2026 — runs in your browser
Markdown Cheatsheet
# H1

Top-level heading

Headings
## H2

Section heading

Headings
### H3

Subsection heading

Headings
#### H4
##### H5
###### H6

Lower-level headings

Headings
Title
=====

H1 (underline style)

Headings
Title
-----

H2 (underline style)

Headings
**bold**

Bold text

Emphasis
*italic*

Italic text

Emphasis
***bold italic***

Bold and italic

Emphasis
~~strikethrough~~

Strikethrough (GFM)

Emphasis
`inline code`

Inline code span

Emphasis
==highlight==

Highlight (extended)

Emphasis
- Item one
- Item two
- Item three

Unordered list

Lists
* Item
* Item

Unordered list (asterisk)

Lists
1. First
2. Second
3. Third

Ordered list

Lists
- Parent
  - Child
    - Grandchild

Nested list (2 spaces per level)

Lists
- [ ] Todo
- [x] Done

Task list (GFM)

Lists
[text](https://example.com)

Inline link

Links & Images
[text](url "title")

Link with tooltip

Links & Images
[text][ref]

[ref]: https://example.com

Reference-style link

Links & Images
<https://example.com>

Autolink (bare URL)

Links & Images
![alt text](image.png)

Inline image

Links & Images
![alt](image.png "title")

Image with title

Links & Images
[![alt](img.png)](https://link)

Clickable image

Links & Images
```
code block
```

Fenced code block

Code
```js
const x = 1;
```

Code block with language

Code
    indented code

Indented code block (4 spaces)

Code
> Quoted text
> continues here

Blockquote

Blocks
> Level 1
>> Level 2

Nested blockquote

Blocks
---

Horizontal rule

Blocks
***

Horizontal rule (asterisks)

Blocks
| Col1 | Col2 |
|------|------|
| a    | b    |

Basic table (GFM)

Tables
| Left | Center | Right |
|:-----|:------:|------:|

Table with alignment

Tables
Line 1  
Line 2

Line break (2 trailing spaces)

Advanced
\*escaped asterisk\*

Escape special characters

Advanced
<br>

HTML line break (allowed)

Advanced
<details>
<summary>Click</summary>
Hidden content
</details>

Collapsible section (HTML)

Advanced
[^1]: Footnote text

Footnote definition (extended)

Advanced
Footnote ref[^1]

Footnote reference

Advanced
Showing 39 of 39 entries

Markdown Cheat Sheet — Headings, Lists, Links, Tables & Code Blocks

John Gruber published the first Markdown spec in 2004 as a way to write web text without typing HTML tags, and the format has since fragmented into CommonMark (the strict 2014 standardisation) and GitHub Flavored Markdown (which added tables, task lists, strikethrough and autolinks). The reference below covers 40+ entries across headings, emphasis, lists, links, code, blockquotes, tables and the GFM extensions most editors quietly assume. Most trouble in real documents doesn't come from forgetting syntax. It comes from quirks that look ordinary but bite. A list item with a code block underneath needs the code indented four spaces past the bullet, not four total, or the block silently merges back into the paragraph. A literal asterisk inside italic text has to be escaped as `\*`, otherwise the parser eats it. The fenced code block language tag is normalised by most popular renderers (highlight.js, Prism, GitHub) but a handful still treat it as case-sensitive, so `js` is the safer habit than `JS`. These are the snippets reached for when fixing exactly that — the nested-list indentation, the escape sequence, the table alignment colons — without rereading the CommonMark spec each time.

Common pitfalls in Markdown

A few patterns earn their place on the first screen of any Markdown document. Two trailing spaces at the end of a line force a `<br>` inside the same paragraph, which is the only way to get a hard line break without a blank line. A blank line between any two blocks separates them; without it, a heading written below text on the next line can be absorbed into the paragraph above depending on the parser. Reference-style links `[text][ref]` with the definition `[ref]: url` at the bottom keep long URLs out of the prose flow and let the same target be reused without copy-paste drift. GFM tables need the pipe-and-dash separator row to render at all, and the alignment colons `:---`, `:---:`, `---:` go in that separator row, not in the header. Raw HTML is allowed inside Markdown by default, which is convenient for `<details>`/`<summary>` collapsibles but also why some renderers strip it for security. The cheatsheet groups all of this into headings, emphasis, lists, links, code, blocks, tables and advanced so the right section is one click away.

  • 40+ Markdown syntax entries
  • CommonMark and GitHub Flavored Markdown
  • Tables and task lists (GFM)
  • Code blocks with languages
  • Footnotes and HTML in Markdown
  • One-click copy to clipboard

Free. No signup. Your inputs stay in your browser. Ads via Google AdSense (consent required).

By ·