Markdown syntax reference

The preview is parsed by marked.js and supports GitHub Flavored Markdown (GFM). Everything below can be pasted straight into the editor.

On this page

That list is typed by hand at the top of the file — it is not a feature the editor generates. Every line is a link to a heading on this page; the how-to is in Table of contents and anchors.

Headings

# Heading 1
## Heading 2
### Heading 3

Headings get anchor ids automatically, so anything in the document can link to them — that is how a table of contents is built: see Table of contents and anchors.

Emphasis

**bold** *italic* ~~strikethrough~~ `inline code`
<u>underline</u>

Markdown has no underline syntax — the toolbar's Underline button inserts the HTML <u> tag. Other Markdown tools may not support it, so be careful if this document will later be fed to a different generator.

Lists

- item
- item
  - nested item (indent by two spaces)

1. ordered item
2. ordered item

- [x] a finished task
- [ ] an unfinished task
[link text](https://example.com)
![alt text](images/screenshot.png)

Image paths are relative to the folder the document lives in. Because the preview runs in the browser, a local image only shows up if the browser can reach that path; a full URL, or keeping images in the same folder, is the safer bet.

Table of contents and anchors

Every heading gets an anchor id automatically, so anywhere in the document you can jump to it with [text](#id). Put a list of those links at the top of the file and you have a clickable table of contents — no more scrolling a long document looking for a section:

[Installation](#installation)
[FAQ](#faq)

## Installation
## FAQ

The id is the heading text itself, converted by three rules:

RuleHeadingLink to write
Lowercased## Quick Start#quick-start
Spaces become hyphens## Chapter 2#chapter-2
Punctuation disappears## Where is my data stored?#where-is-my-data-stored

Chinese and Japanese headings work as ids directly — no transliteration, no manual numbering needed.

⚠️ The third rule is the one that trips people up: punctuation is removed, not turned into a hyphen. So ## Ctrl+S to save becomes #ctrls-to-save, with those two letters run together. If you would rather not work it out every time, the easy way out is to keep punctuation out of your headings.

When the same heading text appears twice in one document, the second one onwards gets a number: #notes, #notes-1, #notes-2.

These are the same rules GitHub uses, so the same .md file keeps working once you push it there. Clicking an entry does not stuff your address bar with # fragments, so Back still leaves the page instead of walking you through every heading you clicked.

Blockquotes and dividers

> A blockquote can span several lines,
> as long as every line starts with the marker.

---

Tables

| Column | Description | Count |
| --- | :---: | ---: |
| left | center | right |
| a | b | 3 |

Colons in the separator row set the alignment: :--- left, :---: center, ---: right. The toolbar's Table button asks how many columns you want, then inserts the header and separator rows.

Code blocks

Put a line of three backticks before and after the code; the opening line may name the language:

```js
const answer = 42;
```

Each code block in the preview gets a Copy button in its top-right corner — one click takes the whole block.

Line breaks

A single newline in Markdown is not a line break. There are two ways to get one:

end the line with two spaces  
and the next line breaks

Or leave a blank line
to get two separate paragraphs.

Filling Markdown's gaps with HTML

Markdown has no underline, no highlight and no comments. This editor's preview passes raw HTML through, so all of the following work (each one tested in this editor):

<u>underline</u>
<mark>highlighted</mark>
Press <kbd>Ctrl</kbd>+<kbd>S</kbd> to save
H<sub>2</sub>O and x<sup>2</sup>

Comments: notes to yourself that never show up

Anything wrapped in an HTML comment is not rendered in the preview, but stays in the .md file. This is the only portable way to comment in Markdown — there is no // or # syntax for it.

<!-- only visible when you open the source -->

This sentence has <!-- a hidden note --> in it; readers only see the text around it.

Whole blocks, inline fragments and multi-line spans all work. It is also the cheapest way to temporarily switch off a chunk of text without deleting it.

Collapsible sections

<details><summary>Show more</summary>

Hidden content. **Markdown still works in here**, but leave a blank line before and after.

</details>

⚠️ These are HTML, not Markdown. Fine in this editor — but if the .md later goes to another generator (a static site, a blogging platform, GitHub), that one may not support them, and may strip them entirely. Use them in your own documents, or check the target first.

⚠️ The preview does no filtering of HTML: whatever you write is what gets rendered. You are editing a file on your own disk, so that is deliberate — it keeps HTML's full power — but do not paste HTML of unknown origin in to preview it.

The one thing this editor adds

YAML front matter at the top of a file is not swallowed as a divider or a heading — it is rendered as its own card. Details in YAML front matter.

Download this page as .md Open it in the editor and you have a ready-made sample document.

← Back to the manual