# H1
Top-level heading
## H2
Section heading
### H3
Subsection heading
#### H4 ##### H5 ###### H6
Lower-level headings
Title =====
H1 (underline style)
Title -----
H2 (underline style)
**bold**
Bold text
*italic*
Italic text
***bold italic***
Bold and italic
~~strikethrough~~
Strikethrough (GFM)
`inline code`
Inline code span
==highlight==
Highlight (extended)
- Item one - Item two - Item three
Unordered list
* Item * Item
Unordered list (asterisk)
1. First 2. Second 3. Third
Ordered list
- Parent
- Child
- Grandchild Nested list (2 spaces per level)
- [ ] Todo - [x] Done
Task list (GFM)
[text](https://example.com)
Inline link
[text](url "title")
Link with tooltip
[text][ref] [ref]: https://example.com
Reference-style link
<https://example.com>
Autolink (bare URL)

Inline image

Image with title
[](https://link)
Clickable image
``` code block ```
Fenced code block
```js const x = 1; ```
Code block with language
indented code
Indented code block (4 spaces)
> Quoted text > continues here
Blockquote
> Level 1 >> Level 2
Nested blockquote
---
Horizontal rule
***
Horizontal rule (asterisks)
| Col1 | Col2 | |------|------| | a | b |
Basic table (GFM)
| Left | Center | Right | |:-----|:------:|------:|
Table with alignment
Line 1 Line 2
Line break (2 trailing spaces)
\*escaped asterisk\*
Escape special characters
<br>
HTML line break (allowed)
<details> <summary>Click</summary> Hidden content </details>
Collapsible section (HTML)
[^1]: Footnote text
Footnote definition (extended)
Footnote ref[^1]
Footnote reference
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 Marco B. ·