Markdown basics
Pages are written in Markdown. Everything in standard Markdown works, plus tables, task lists, strikethrough and footnotes.
.md and .mdx
.md | .mdx | |
|---|---|---|
| Markdown | Yes | Yes |
| HTML | Yes | Yes |
Components - <Callout>, <Card>, … | No | Yes |
Snippets - import | No | Yes |
JavaScript expressions - {1 + 1} | No | Yes |
Use .mdx for pages with components - most pages. In an .mdx file, { and < start code and components. To write them as text, put them in backticks (`{id}`) or escape them: \{, <.
Text
**Bold**, *italic*, ~~strikethrough~~, `inline code`, and a line break with two spaces at the end of a line.
> A quote, for a remark or a citation.Bold, italic, strikethrough, inline code.
A quote, for a remark or a citation.
Headings
The page’s title is its main heading, so start sections at ##:
## Install the SDK
### On macOS## and ### headings are listed in the table of contents on the right. Every heading gets an anchor from its text - ## Install the SDK is #install-the-sdk - and a link icon that appears on hover, to copy a link to it.
Links
[Quickstart](/docs/quickstart/)
[Install the SDK](/docs/sdk/#install-the-sdk)
[Our blog](https://blog.example.com)
<https://example.com>Write links to your own pages from the site’s root, starting with /. Page addresses end in a slash (/docs/guides/setup/), so a relative link like [Install](install) on that page points to /docs/guides/setup/install/ - one level deeper than it looks. writedocs broken-links finds those, and anchors that don’t exist.
Lists
1. Create an account.
2. Copy your API key.
- Keep it secret.
- Rotate it every 90 days.
- [x] Install the SDK
- [ ] Send a test request- Create an account.
- Copy your API key.
- Keep it secret.
- Rotate it every 90 days.
Task lists
An item that starts with [ ] or [x] is a task: readers can tick it, by clicking the box or the item’s text. In a bulleted list the box takes the bullet’s place; a numbered list keeps its numbers, with the box after them. [x] starts the item ticked. A ticked item’s text is shown in a lighter color, so what’s left stands out; links in it keep their color.
What a reader ticks is remembered in their browser, page by page, so a checklist (setup steps, a recipe’s ingredients) is still ticked when they come back. Try it on the list above.
- Each item is remembered by its text. Changing an item’s text starts it over as written; adding, removing or reordering the other items doesn’t move anyone’s ticks.
- It’s kept in the reader’s browser only: it doesn’t follow them to another browser or device, and nobody else sees it. In a private window it lasts until the window closes.
- A reader can’t untick everything at once: they untick each item, or clear the site’s data in their browser.
Tables
| Plan | Requests per minute | Support |
| ---------- | ------------------: | :-----: |
| Free | 60 | - |
| Business | 1,000 | Email || Plan | Requests per minute | Support |
|---|---|---|
| Free | 60 | - |
| Business | 1,000 |
A colon in the separator row aligns a column: ---: to the right, :---: to the center.
A table fills the width of the page’s text. One that doesn’t fit - many columns, or long codes that can’t break across lines - scrolls sideways in its own box, on a phone and on a desktop alike, and the rest of the page stays where it is. This holds for tables written in Markdown and as HTML in an .mdx page, inside components too. While a wide table’s columns are squeezed, each one narrows to its longest word or code, so a short description column can wrap a lot: keep codes short, or split a very wide table in two.
To filter a long table as the reader types, wrap it in a Searchbar.
Images

The text in brackets is the image’s description for screen readers - writedocs a11y reports images without one. Every image opens larger when clicked.
Images can be in any folder of the project - see Project structure. For a caption, a size, or a different image in dark mode, use the Image component.
Images load as the reader gets near them, and keep their place on the page while they do - see How images load.
Footnotes
Rate limits are counted per API key.[^1]
[^1]: Keys created before 2024 share one limit per account.Rate limits are counted per API key.1
The notes are listed at the bottom of the page, linked both ways.
Code
Fenced code blocks get highlighting, titles, line highlighting, diffs and more - see Code blocks. Inline code goes in single backticks.
HTML
HTML works in both .md and .mdx pages:
<details>
<summary>Show the full response</summary>
The response includes ...
</details>
Press <kbd>Ctrl</kbd> + <kbd>K</kbd> to search.In an .mdx file, write HTML the way JSX does: className instead of class, every tag closed (<br />, <img ... />), and style={{ color: "red" }} as an object.
Styling with classes
Utility classes style an element without a stylesheet - spacing, layout, colors, sizes. They’re the class names of Tailwind CSS, and dark: applies a class only in dark mode:
<div className="grid grid-cols-2 gap-4 mt-8">
<img className="rounded-lg border" src="/images/before.png" alt="Before" />
<img className="rounded-lg border" src="/images/after.png" alt="After" />
</div>
<img className="block dark:hidden" src="/images/chart-light.png" alt="Usage chart" />
<img className="hidden dark:block" src="/images/chart-dark.png" alt="Usage chart" />The build makes a class’s style when it finds the class name in your pages or snippets (.md, .mdx, .jsx, .tsx). A class that only a script of yours adds while the page runs may have no style - write the class in a page too, or style it in your own CSS.
For your own classes and styles, see Custom CSS and scripts.
Footnotes
-
Keys created before 2024 share one limit per account. ↩