How to use this page
Every row below shows Markdown source on the left and the rendered result on the right. Copy what you need, tweak the content, and move on. For a one-page version to print or pin, our Markdown cheat sheet has the same material compressed for reference. For the conceptual intro, start with Markdown basics.
This covers the syntax that works in the wild: GitHub, Obsidian, Notion imports, Slack messages, VS Code previews, and every AI chat tool. Where behavior differs between renderers, it is called out inline.
Headings
One pound sign through six pound signs, always followed by a space. Two trailing pound signs at the end are allowed but unusual — skip them.
# H1 — page title ## H2 — section ### H3 — subsection #### H4 ##### H5 ###### H6
H1 — page title
H2 — section
H3 — subsection
H4
H5
H6
There is a second syntax for H1 and H2 using underlines — equals signs for H1, dashes for H2 — but nobody uses it anymore. Stick with pound signs.
Emphasis: bold, italic, strikethrough
*italic* or _italic_ **bold** or __bold__ ***bold italic*** ~~strikethrough~~
italic or italic
bold or bold
bold italic
strikethrough
Asterisks and underscores are interchangeable. Asterisks win — they do not accidentally break when you bold part of a word (some_long_name stays intact). Strikethrough is technically a GitHub extension, but every modern renderer supports it.
Paragraphs and line breaks
Separate paragraphs with a blank line. A single newline inside a paragraph is ignored — the text flows together. If you need a hard line break inside a paragraph (like a street address), end the line with two spaces.
First paragraph. Second paragraph — separated by a blank line. Address line one Address line two
First paragraph.
Second paragraph — separated by a blank line.
Address line one
Address line two
Unordered lists
- Milk - Eggs - Bread - Sourdough - Rye
- Milk
- Eggs
- Bread
- Sourdough
- Rye
Dashes, asterisks, and plus signs all work as bullet markers. Dashes are the most common because they are easiest to type. Indent two spaces to nest.
Ordered lists
1. Preheat oven to 400 2. Season the chicken 3. Roast for 45 minutes 1. Check at 30 minutes 2. Baste if dry
- Preheat oven to 400
- Season the chicken
- Roast for 45 minutes
- Check at 30 minutes
- Baste if dry
The numbers you type do not have to match the output. You can write 1. on every line and the renderer will count correctly. That sounds weird until you reorder a list — then you never want to renumber by hand again.
Task lists
- [x] Draft the proposal - [x] Email to legal - [ ] Incorporate feedback - [ ] Send final version
- Draft the proposal
- Email to legal
- Incorporate feedback
- Send final version
Task lists are a GitHub invention, but they render in Obsidian, Notion, Slack, and most AI tools. Lowercase x for checked, space for unchecked. The bracket pair must be there.
Links
[Berkshire annual letters](https://berkshirehathaway.com/letters/) Or auto-linked: <https://example.com> Reference style: See [the SEC filing][1] for details. [1]: https://sec.gov/edgar/search
Or auto-linked: https://example.com
Reference style:
See the SEC filing for details.
Inline links are square brackets followed by parentheses. Reference links let you keep URLs at the bottom of the file — cleaner for longer documents. Both render identically.
Images
 
Same as a link, with a ! in front. The text in brackets is alt text — critical for accessibility and for AI tools that cannot see the image. Always fill it in.
Blockquotes
> Be fearful when others are greedy, > and greedy when others are fearful. > > — Warren Buffett > Quotes can contain **formatting** > and even lists: > > - Point one > - Point two
Be fearful when others are greedy, and greedy when others are fearful.
— Warren Buffett
Quotes can contain formatting and even lists:
- Point one
- Point two
Inline code
Run `npm install` before starting the server. The file lives at `/etc/hosts`.
Run npm install before starting the server.
The file lives at /etc/hosts.
Code blocks
```python
def greet(name):
return f"Hello, {name}"
```def greet(name):
return f"Hello, {name}"Three backticks start and end a block. The language name after the opening fence (python, bash, sql, json, yaml) tells the renderer how to color the syntax. More on this in code blocks.
Tables
| Quarter | Revenue | YoY | |---------|--------:|-----:| | Q1 2025 | $4.2M | +18% | | Q2 2025 | $4.8M | +22% | | Q3 2025 | $5.1M | +15% |
| Quarter | Revenue | YoY |
|---|---|---|
| Q1 2025 | $4.2M | +18% |
| Q2 2025 | $4.8M | +22% |
| Q3 2025 | $5.1M | +15% |
Colons in the separator row control alignment: :--- left, ---: right, :---: center. The columns do not need to line up perfectly in the source — the renderer figures it out. Details in the tables guide.
Horizontal rule
Section one content. --- Section two content.
Section one content.
Section two content.
Escaping characters
A backslash before any Markdown character turns it into literal text. Useful when you need the character itself to appear.
\*This is not italic\* Use \# for a literal pound sign Prices start at \$49
*This is not italic*
Use # for a literal pound sign
Prices start at $49
HTML fallback
Every Markdown renderer accepts raw HTML as a fallback. If Markdown does not have a syntax for what you want (colored text, a superscript, a video embed), drop in the HTML tag and it will pass through. Do not overdo it — the whole point of Markdown is to avoid HTML — but it is there when you need it.
The answer is E = mc<sup>2</sup>. <details> <summary>Click to expand</summary> Hidden content goes here. </details>
The answer is E = mc2.
Click to expand
Hidden content goes here.
Frontmatter
Many tools (Jekyll, Hugo, Obsidian, Notion imports) read a YAML block at the top of a Markdown file for metadata — title, tags, date, author. It is enclosed in triple dashes.
--- title: Q3 Earnings Analysis date: 2025-10-15 tags: [finance, earnings, aapl] author: Jane Chen --- # Q3 Earnings Analysis The actual article starts here...
Q3 Earnings Analysis
The actual article starts here...
Printable cheat sheet
If you want this as a printed reference, use your browser's print-to-PDF on this page, or visit the Markdown cheat sheet tool for a layout optimized for a single page. For context on why Markdown is worth learning in the first place, the blog post on why Markdown works best for AI covers the token-efficiency side. Converting existing files? Start with our Word to Markdown converter.