Markdown Cheat Sheet
Quick reference for Markdown syntax. Bookmark this so you never have to Google "how to do a table in markdown" again.
Headers
# H1
## H2
### H3
#### H4
##### H5
###### H6
Emphasis
*italic* or _italic_
**bold** or __bold__
***bold italic*** or ___bold italic___
~~strikethrough~~
Renders as: italic, bold, bold italic, strikethrough
Line Breaks & Paragraphs
- A blank line starts a new paragraph.
- Two trailing spaces at the end of a line force a line break
. - Alternatively use
<br />for an explicit break.
Lists
Unordered:
- Item 1
- Item 2
- Nested item
* Also works with asterisks
+ Or plus signs
Ordered:
1. First
2. Second
1. Nested
3. Third
Task lists (GitHub-flavored, supported by Docusaurus):
- [x] Done thing
- [ ] Not done thing
Links
[Link text](https://example.com)
[Link with title](https://example.com "Tooltip text")
[Reference link][ref]
[ref]: https://example.com
Internal Docusaurus links (relative, to another doc):
[See the intro](./intro.md)
[See the guide](../guides/getting-started.md)
Images


Blockquotes
> Single line quote
> Multi-line quote
> continues here
>
> > Nested quote
Code
Inline: `code` → code
Fenced block with language (enables syntax highlighting):
```js
const x = 1;
console.log(x);
```
Fenced block with a title (Docusaurus extension):
```js title="src/index.js"
console.log("hello");
```
Line highlighting (Docusaurus extension):
```js {1,3-4}
const a = 1;
const b = 2;
const c = 3;
const d = 4;
```
Tables
| Left | Center | Right |
| :--- | :----: | ----: |
| a | b | c |
| 1 | 2 | 3 |
Colon placement controls alignment: :--- left, :---: center, ---: right.
Horizontal Rule
---
***
___
Footnotes
Here's a claim that needs a citation.[^1]
[^1]: This is the footnote text.
Escaping Characters
Prefix with a backslash to show a literal character:
\* not a bullet
\# not a header
Front Matter (Docusaurus page metadata)
Goes at the very top of the file:
---
id: my-doc
title: My Doc Title
sidebar_label: Short Label
sidebar_position: 2
description: Shown in meta tags and search results.
tags: [tag1, tag2]
---
Docusaurus Admonitions
:::note
Some **content** with markdown syntax.
:::
:::tip
A helpful tip.
:::
:::info
Just some info.
:::
:::warning
Be careful here.
:::
:::danger
Take extreme care.
:::
:::note[Custom Title]
Admonition with a custom title.
:::
Details / Collapsible Sections
<details>
<summary>Click to expand</summary>
Hidden content goes here. Remember the blank line above
so Markdown parses the content inside correctly.
</details>
Importing Code from Files (Docusaurus extension)
\```mdx-code-block
import CodeBlock from '@theme/CodeBlock';
import MyComponent from '!!raw-loader!./myComponent';
<CodeBlock language="jsx">{MyComponent}</CodeBlock>
\```
Embedding JSX / Components (MDX only)
If the file is .mdx, you can drop in React components directly:
import MyButton from '@site/src/components/MyButton';
<MyButton>Click me</MyButton>
Quick Gotchas
- Docusaurus docs use
.mdor.mdx— use.mdxwhen you need JSX/components. - Curly braces
{ }are special in.mdxfiles (JSX expressions) — escape them as\{\}or wrap in a code span if you just want literal braces. - Relative links between docs should point to the source
.md/.mdxfile, not the built URL. - HTML tags work in both
.mdand.mdx, but self-closing tags like<br />need the closing slash in.mdx.