Markdown Cheat Sheet: Syntax Reference with Examples
This reference lists every common Markdown element with a plain, one-line explanation and a short, copyable fenced code example.
Headings, Paragraphs and Line Breaks
Headings use one to six # characters followed by a space; fewer # means a bigger heading. A blank line starts a new paragraph. To force a line break inside a paragraph, end a line with two spaces or a backslash.
# Heading 1
### Heading 3
A paragraph.
Line break with two trailing spaces above.
Emphasis, Links and Images
Asterisks or underscores mark italic and bold text, and combining them gives both. Links use square brackets for the text and parentheses for the URL; images use the same syntax with a leading !.
*italic* **bold** ***bold italic***
[link text](https://example.com)

Lists and Nested Lists
Unordered lists use -, * or +. Ordered lists use numbers followed by a period. Indent by two or four spaces to nest a list inside another.
- item one
- item two
- nested item
1. first
2. second
Tables
GitHub Flavored Markdown adds pipe tables. A row of dashes under the header row sets the column structure and can set alignment.
| Name | Type |
| --- | --- |
| Alpha | text |
| Beta | number |
Code, Blockquotes and Horizontal Rules
Backticks mark inline code, and triple backticks open a fenced block, optionally tagged with a language for highlighting. A > at the start of a line marks a blockquote; stack multiple > to nest quotes. Three dashes, asterisks or underscores alone on a line draw a horizontal rule.
Use `git status` to check the working tree.
print("hello")
> A quoted sentence.
>> A nested quote.
---
Task Lists and Escaping
GitHub Flavored Markdown supports checkboxes inside list items. A backslash before a special character prints it literally instead of triggering formatting. Raw HTML tags are also allowed inline in most renderers, though this cheat sheet sticks to plain Markdown syntax.
- [x] done
- [ ] not done
Escaped: \* not italic \*
GitHub Flavored Markdown vs CommonMark
CommonMark defines the core rules: headings, emphasis, lists, links, code blocks and blockquotes. GitHub Flavored Markdown builds on CommonMark and adds tables, task lists, strikethrough and automatic linking of bare URLs. A file written for one usually renders fine in the other, but tables and checkboxes need GitHub Flavored Markdown support specifically.
Extended Syntax: Math, Footnotes, Front Matter and Diagrams
Support for these extensions varies by renderer, so check the target tool before relying on them. Math uses LaTeX-style delimiters, footnotes use a caret and a label, front matter is a metadata block at the top of the file, and diagrams use a tagged fenced code block.
Inline math: $a^2 + b^2 = c^2$
Block math: $$E = mc^2$$
Text with a note.[^1]
[^1]: The note itself.
---
title: Example document
date: 2026-01-01
---
graph TD
A --> B
B --> C
Putting It Together
Write and preview a document with the Markdown Editor, check syntax problems with Markdown Lint, and generate a table of contents with Markdown TOC. When you need a shareable file, export with Markdown to PDF or Markdown to Word. For a deeper look at converting PDFs back into Markdown, see the PDF to Markdown guide.