Cheat sheetDocs

Markdown syntax

All of everyday Markdown on one sheet — headings, emphasis, lists, links, images, code and tables — each with what it renders as.

Last updated

Headings & emphasis

You typeYou get
# Title / ## SectionHeading level 1 / level 2 — one # per level, up to six.
**bold**Bold text.
*italic*Italic text.
~~struck~~Strikethrough (GitHub-flavoured).
`code`Inline code in a monospace chip.

Lists & quotes

You typeYou get
- itemA bulleted list; indent two spaces to nest.
1. itemA numbered list — the numbers self-correct, so 1. everywhere works.
- [ ] task / - [x] doneCheckboxes (GitHub-flavoured task list).
> quoted lineA blockquote; stack the > for nesting.

Links & images

You typeYou get
[text](https://url)A link with custom text.
![alt text](image.png)An image — the leading ! is the whole difference from a link.
<https://url>A bare auto-link, shown as-is.

Code blocks

You typeYou get
```js … ```A fenced code block; the word after the fence sets syntax highlighting.
four spacesThe old-style indented code block — fences are clearer, prefer them.

Tables & extras

You typeYou get
| a | b | with | --- | --- |A table: header row, then a divider row of dashes, then data rows.
| :--- | :---: | ---: |Column alignment in the divider — left, centre, right.
---A horizontal rule, on its own line with blank lines around it.
Two trailing spacesA line break WITHIN a paragraph (or end the line with a backslash).

Worth remembering

  • Blank lines matter more than anything else: most "broken" Markdown is a missing empty line before a list, table or fence.
  • Preview any of this live in the Markdown Preview tool — type on the left, rendered result on the right.

Related in Cheat sheets