Reference · Markdown · CommonMark

Markdown Guide

The complete syntax you need day to day — CommonMark plus the GitHub Flavored Markdown extras everyone treats as standard.

Markdown source
# Heading 1
## Heading 2

Paragraph with **bold**, *italic*, and `inline code`.

- Bullet one
- Bullet two
  - Nested

1. First
2. Second

[Link text](https://example.com)
![Alt text](/img.png)

> Blockquote line

```ts
const x: number = 42;
```

| Col A | Col B |
|-------|-------|
| 1     | 2     |

Core Syntax

Headings

Use # through ###### for H1–H6. Leave a blank line before and after each heading. Avoid skipping levels (H1 → H3) for accessibility.

Emphasis

  • *italic* or _italic_ → italic
  • **bold** → bold
  • ***both*** → both
  • GFM: ~~strike~~ → strike

Lists

Unordered lists use -, *, or +. Ordered lists use any number followed by .. Nest with two spaces of indentation (four if your renderer is strict).

Links and Images

  • [text](url) — inline link
  • [text](url "title") — link with hover title
  • ![alt](url) — inline image
  • Reference style: [text][id] then [id]: url at the bottom

Code

Backticks for inline `code`. Fenced blocks use three backticks with an optional language tag for syntax highlighting.

Tables (GFM)

Pipes separate cells; a divider row sets alignment: :--- left, :---: center, ---: right.

Common Pitfalls

  • Hard line breaks require two trailing spaces or a blank line
  • HTML inside Markdown works, but mixing can confuse strict parsers
  • Underscores inside words may be interpreted as emphasis — use backticks for identifiers
  • Tables in CommonMark are a GFM extension, not core

Try It

Render Markdown to HTML in your browser with our free Markdown ↔ HTML converter.

CommonMark baseline

If it works in CommonMark, it works everywhere.

Fenced code

Prefer ``` with a language tag over indented blocks.

GFM for tables

Pipes and dashes — just make sure your renderer supports GFM.