Headings
Start a line with one to six # characters. One # is the largest heading; leave a space after the last #.
# Heading 1
## Heading 2
### Heading 3cheat-sheet.md
Every piece of syntax MD Doctor understands, with the exact source and the result it renders. Copy a snippet, or open it straight in the editor.
Start a line with one to six # characters. One # is the largest heading; leave a space after the last #.
# Heading 1
## Heading 2
### Heading 3Wrap text in two asterisks for bold and one for italic. Three asterisks make it both.
**Bold**, *italic* and ***both***.Bold, italic and both.
Start a line with > to quote it. A quote can contain other Markdown, including lists.
> Markdown is intended to be as easy-to-read
> and easy-to-write as is feasible.Markdown is intended to be as easy-to-read and easy-to-write as is feasible.
Start each line with -, * or +. Indent by two spaces to nest a list.
- Milk
- Bread
- Sourdough
- Rye
- CoffeeStart each line with a number and a period. The first number sets where counting begins.
1. Write
2. Preview
3. ExportPut the link text in square brackets and the URL in parentheses. An optional title in quotes shows on hover.
[CommonMark](https://commonmark.org "The CommonMark spec")Like a link with a leading !. The text in brackets becomes the image's alt text.
Wrap code in single backticks to show it in a monospace font.
Run `npm run build` to compile.Run npm run build to compile.
Three or more hyphens on a line of their own draw a divider.
Above the line
---
Below the lineAbove the line
Below the line
Put a backslash before a character to show it literally instead of as formatting.
\*Not italic\* and 1\. not a list*Not italic* and 1. not a list
Wrap text in two tildes to cross it out.
~~Old price~~ New priceOld price New price
Add [ ] or [x] after a list marker to make a checklist.
- [x] Draft
- [x] Review
- [ ] PublishSeparate columns with pipes and the header row with hyphens. Colons set each column's alignment.
| Format | Export | Notes |
| :----- | :----: | ---------: |
| MD | ✓ | Plain text |
| HTML | ✓ | Standalone |
| PDF | ✓ | Via print || Format | Export | Notes |
|---|---|---|
| MD | ✓ | Plain text |
| HTML | ✓ | Standalone |
| ✓ | Via print |
Fence code with three backticks and name the language for syntax highlighting.
```js
const greet = (name) => `Hello, ${name}!`;
console.log(greet("Markdown"));
```const greet = (name) => `Hello, ${name}!`;
console.log(greet("Markdown"));
Mark a reference with [^1] and write the note anywhere in the document; notes are collected at the end.
Web addresses and email addresses become links without any extra syntax.
Read https://commonmark.org or write to hello@example.com.Read https://commonmark.org or write to hello@example.com.
Use $…$ for inline math and $$…$$ on their own lines for display equations, typeset with KaTeX.
Inline: $E = mc^2$
$$
\int_0^1 x^2\,dx = \frac{1}{3}
$$Inline:
A code block marked mermaid becomes a flowchart, sequence diagram, Gantt chart and more.
```mermaid
flowchart LR
A[Write] --> B[Preview] --> C[Export]
```Mermaid diagrams render live in the editor preview.
Raw HTML fills the gaps Markdown has no syntax for, such as keyboard keys or collapsible sections.
Press <kbd>Ctrl</kbd> + <kbd>S</kbd> to save.
<details>
<summary>Show more</summary>
Hidden until opened.
</details>Press Ctrl + S to save.
Hidden until opened.
Everything above works in the editor, with a live preview as you type.
Open the editor