Markdown Syntax
This page is mainly about Markdown itself: the plain-text syntax for headings, paragraphs, lists, links, emphasis, code, blockquotes, and other lightweight document structure.
The core practical question is simple: which parts of a document are plain Markdown syntax, and which parts are conventions or app-specific extensions layered on top? That distinction matters whenever a file needs to stay portable across editors, renderers, and products.
What belongs to core Markdown
Markdown began as a readable plain-text format for structured documents. The original project emphasized readability in source form, while CommonMark later provided a stronger specification so implementations could behave more consistently.
- Block structure: headings, paragraphs, lists, blockquotes, code blocks, and thematic breaks.
- Inline structure: emphasis, strong emphasis, inline code, links, and images.
- Portability questions: where implementations agree, and where extensions or ambiguity start to matter.
Syntax starter
Headings
ATX headings use leading `#` marks. The number of `#` characters indicates depth.
# Heading 1
## Heading 2
### Heading 3
Emphasis and strong emphasis
Single `*` or `_` typically marks emphasis. Double markers typically mark strong emphasis.
*emphasis*
**strong**
_emphasis_
__strong__
Links and images
Links use brackets plus parentheses. Images add a leading exclamation mark.
[CommonMark](https://commonmark.org/)

Inline code and fenced code blocks
Backticks mark inline code. Triple backticks usually fence code blocks in modern Markdown implementations.
`inline code`
```js
console.log("code block");
```
Common block forms
Paragraphs
Paragraphs are separated by blank lines. Markdown generally treats plain wrapped lines as part of the same paragraph until a blank line or another block form appears.
Lists
Unordered lists usually use `-`, `*`, or `+`. Ordered lists usually use `1.` style markers. Nesting behavior can vary if indentation is sloppy.
Blockquotes
Blockquotes begin with `>`. They can contain multiple paragraphs and, in many implementations, nested structures such as lists or code blocks.
Thematic breaks
Three or more matching markers such as `---`, `***`, or `___` usually produce a thematic break.
Where ambiguity starts
The original Markdown project was influential, but not fully unambiguous as a formal specification. That is one reason CommonMark matters: it gives a stronger, testable description of how Markdown should parse.
In practice, syntax questions often break into three layers:
- Original Markdown behavior as described by John Gruber.
- CommonMark behavior as a stronger modern reference point.
- Implementation-specific extensions such as tables, task lists, footnotes, wiki links, callouts, or math blocks.
If you want portability, write toward the shared core first and treat extensions as optional rather than assumed.
Starting references
CommonMark
Start here if you need the current, testable description of core Markdown behavior and a path to the formal spec.
Markdown project page
Useful for the original framing: readable plain text first, then conversion to structurally valid HTML.
CommonMark help
A quick reference and tutorial-style entry point when you need examples more than specification detail.
Knowledge bases
Use the broader page when the question shifts from Markdown syntax to note systems, linked working memory, or product categories.