Cheatsheet: Markdown

Last updated 2026-09-19

Text and structure

Headings use one to six # characters.

# H1
## H2
### H3
#### H4
##### H5
###### H6

Bold, italic, and combined emphasis.

*Italic*
**Bold**
***Bold and Italic***

Strikethrough is supported by GitHub Flavored Markdown.

~~Removed text~~

Paragraphs are separated by a blank line.

First paragraph.

Second paragraph.

Create a hard line break with two trailing spaces or a backslash.

Line one  
Line two

Line one\
Line two

Use a horizontal rule to separate sections.

---

***

___

Lists, links, and media

Unordered lists use -, *, or + markers.

- Apples
- Bananas
  - Cavendish

Ordered lists use numbers followed by periods. Renderers auto-number regardless of the digits typed.

1. Install
2. Configure
3. Run

Nest a list by indenting the sub-item at least two (commonly four) spaces under its parent marker. Ordered and unordered markers can mix across levels.

1. Frontend
   - React
   - Vue
2. Backend
   1. Node.js
   2. Go

Continue a list item across multiple paragraphs, or add a code block/quote inside it, by indenting the continuation to match the item's text.

- Step one.

  Extra detail paragraph, indented to align with "Step".

  ```bash
  npm install
  ```

- Step two.

A tight list (no blank lines between items) renders without paragraph tags; a loose list (blank line between/inside items) wraps each item's text in a paragraph, adding spacing.

Tight:
- one
- two

Loose:
- one

- two

Task lists use checkboxes in GitHub Flavored Markdown, and nest like any other list.

- [x] Write docs
- [ ] Publish release
  - [ ] Draft changelog
  - [ ] Tag version

Inline links use link text and a URL.

[DevTools Daily](https://www.devtoolsdaily.com/)

Reference-style links keep URLs elsewhere in the document.

Read the [docs][docs-link].

[docs-link]: https://example.com/docs

Autolinks wrap a bare URL or email in angle brackets to make it clickable without link-text syntax.

<https://example.com>
<hello@example.com>

Images use link syntax prefixed with an exclamation point.

![Alt Text](https://example.com/image.png)

Code, quotes, and tables

Inline code is wrapped in backticks. Use more backticks around the fence when the code itself contains a backtick.

Use `npm run build` to build.

``Use `code` inside code``

Fenced code blocks use triple backticks and can include a language hint for syntax highlighting.

```ts
const message: string = 'hello';
```

Diff-style highlighting in fenced code blocks (supported by many renderers, including GitHub) marks added/removed lines.

```diff
- const old = true;
+ const updated = true;
```

Indented code blocks use four leading spaces, but a fenced block is usually preferred since it supports language hints.

const value = 42;

Blockquotes start with > and can be nested.

> Quote
>
> > Nested quote

Tables use pipes and a separator row.

| Name | Role |
| --- | --- |
| Ada | Admin |
| Lin | User |

Align table columns with colons in the separator row.

| Left | Center | Right |
| :--- | :---: | ---: |
| a | b | c |

Escape a literal pipe character inside a table cell so it isn't read as a column boundary.

| Expression | Meaning |
| --- | --- |
| `a \| b` | logical or |

Escape Markdown punctuation with a backslash when you need literal characters.

\*not italic\*
\[not a link\](url)
\# not a heading

FAQ