Markdown cheat sheet

A concise reference for the CommonMark, GitHub-Flavored Markdown and math syntax you can use in this viewer. Copy a pattern into the editor to see the formatted result.

Last updated: November 15, 2026

How to read this page

The examples use standard Markdown. This viewer renders CommonMark and GitHub-Flavored Markdown, but it intentionally removes raw HTML. Links must use http, https or mailto, and images must use http or https.

Headings

Start a line with one to six number signs. Leave a space after the signs.
MarkdownResult
# Heading 1 ## Heading 2 ### Heading 3

Use headings in order. The viewer styles all six levels, and DOCX export maps them to Word heading styles.

Heading 1

Heading 2

Heading 3

Emphasis and inline formatting

Use asterisks or underscores for emphasis, and tildes for strikethrough.
MarkdownResult
**bold text**bold text
*italic text*italic text
***bold and italic***bold and italic
~~strikethrough~~

Strikethrough is a GitHub-Flavored Markdown extension.

strikethrough
`inline code`inline code

Lists and task lists

Indent nested list items with spaces. Task list checkboxes are read-only in the preview.
MarkdownResult
- First item - Second item - Nested item
  • First item
  • Second item
    • Nested item
1. First step 2. Second step 3. Third step

Numbers are rendered in sequence. You can reorder items without renumbering the source.

  1. First step
  2. Second step
  3. Third step
- [x] Finished task - [ ] Open task

Task lists are a GFM extension. DOCX export uses checkbox characters.

  • Finished task
  • Open task

Code

Use backticks for inline code and a fenced block for multiple lines.
MarkdownResult
```ts const total = items.length; ```

The language label is preserved in the HTML. This viewer displays code as plain text and does not add syntax highlighting.

const total = items.length;
Four spaces also create a code block.
Four spaces also create a code block.

Blockquotes and horizontal rules

Use a greater-than sign for quoted text and three or more hyphens for a divider.
MarkdownResult
> A quoted note.
A quoted note.
---

Use a blank line before the divider so the previous paragraph is not interpreted as a heading.


Tables

Separate columns with pipes. The second row defines each column's alignment.
MarkdownResult
| Feature | Status | | :--- | ---: | | Preview | Working | | Export | Working |

Use :--- for left, :---: for center and ---: for right alignment.

FeatureStatus
PreviewWorking
ExportWorking

Footnotes

Reference a note in the text and define it later with a matching label.
MarkdownResult
A statement with a note.[^1] [^1]: The note text appears at the end.

Footnotes are a GFM extension. The rendered note list appears after the document content.

A statement with a note.1

Math with KaTeX

Use dollar signs for inline and display math. LaTeX-style \\( \\) and \\[ \\] delimiters are also normalized.
MarkdownResult
$a^2 + b^2 = c^2$

Inline math sits inside a sentence.

a² + b² = c²
$$ \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$

Place display math on its own line for the cleanest Word export.

(−b ± √(b² − 4ac)) / 2a
\( E = mc^2 \)

Backslash-parenthesis and backslash-bracket delimiters are converted before rendering.

E = mc²

Math and DOCX export

Supported LaTeX becomes editable Word equations. Malformed or unsupported expressions are replaced with labeled LaTeX source and a warning. A document can contain up to 500 equations.

Escaping, line breaks and raw HTML

A few syntax rules prevent surprising formatting.
MarkdownResult
\*not italic\*

A backslash escapes a Markdown character.

*not italic*
First line Second line

Two trailing spaces create a hard line break. A blank line starts a new paragraph.

First line
Second line
<span style="color: red">Red text</span>

Raw HTML is not rendered. Use Markdown syntax instead of HTML tags.

The raw HTML is removed; only any plain text may remain.

Notes specific to this viewer

The cheat sheet describes syntax, not every browser or export behavior.
  • Raw HTML is sanitized out before KaTeX renders the document.
  • Links are limited to http, https and mailto. Other protocols are removed.
  • Images must use http or https and load from the remote host.
  • Mermaid diagrams and syntax highlighting are not supported.
  • Preview and export are limited to 120,000 characters; local files are limited to 150,000 bytes.

Keep exploring