Markdown Cheatsheet¶
GitHub Flavored Markdown Reference
Every syntax rule below is grouped by where it actually comes from, since "Markdown" on GitHub is really three layers stacked on top of each other:
- CommonMark — base spec, works everywhere
- GFM — GitHub Flavored Markdown extension (spec-defined)
- GitHub.com — web app rendering only, not in any Markdown spec
Headings — CommonMark¶
ATX-style headings use 1–6 # characters followed by a space. A closing run of
# is optional and ignored.
Emphasis — CommonMark (+ GFM)¶
Bold and italic are core CommonMark. Strikethrough (~~text~~) is a GFM-only
addition.
Paragraphs & Line Breaks — CommonMark¶
A blank line starts a new paragraph. For a hard line break inside one paragraph,
end the line with two or more trailing spaces, or a trailing backslash \.
First paragraph.
Second paragraph, line one␣␣
Second paragraph, line two
Line one\
Line two (backslash break)
The ␣␣ above stands in for two literal trailing spaces — invisible in most
editors, which is exactly why the backslash form is usually the safer choice.
Blockquotes — CommonMark¶
Prefix a line with >. Quotes can be nested and can contain other block
elements like lists or code.
> Single level quote.
>
> > Nested quote inside it.
>
> Back to the first level, with a **bold** word.
Lists — CommonMark¶
Unordered lists accept -, *, or + as the bullet marker — pick one and stay
consistent. Ordered lists use any number followed by .; the actual numbers
after the first don't matter for rendering.
- Item one
- Item two
- Nested item
- Item three
1. First step
2. Second step
1. Nested step
3. Third step
Task Lists — GFM¶
A list item written as [ ] or [x] renders as an interactive-looking
checkbox. On GitHub.com, checkboxes in issues and PRs are actually clickable.
- [x] Write cheatsheet
- [x] Add GFM extensions
- [ ] Ship it
- [ ] Sub-tasks:
- [x] Draft
- [ ] Review
Code — CommonMark¶
Inline code uses single backticks. Fenced code blocks use triple backticks and accept an optional language hint that GitHub.com uses for syntax highlighting.
Links — CommonMark¶
Inline links carry the URL right in the text. Reference-style links keep prose clean by parking the URL in a definition elsewhere in the document.
[Anthropic](https://anthropic.com "Anthropic homepage")
Check out [TGWAB][tgwab] for MSP tips.
[tgwab]: https://techguywithabeard.com "TechGuyWithABeard"
Autolinks — CommonMark (+ GFM extended)¶
CommonMark auto-links anything wrapped in angle brackets. GFM's extended
autolinks go further and link bare URLs, www. domains, and email addresses
with no brackets at all.
<https://example.com>
<support@techguywithabeard.com>
Just paste it bare: https://github.com
Or a bare domain: www.michalferber.dev
Images — CommonMark¶
Same syntax as links with a leading !. Wrap an image in a link to make it
clickable.

[](https://techguywithabeard.com)
Tables — GFM¶
Pipe-delimited rows with a required header separator. Colons in the separator control column alignment.
| Service | Uptime | Cost |
| :--------- | :-----: | -----: |
| DNS | 99.99% | $150 |
| Migration | 99.9% | $400 |
| Service | Uptime | Cost |
|---|---|---|
| DNS | 99.99% | $150 |
| Migration | 99.9% | $400 |
Horizontal Rules — CommonMark¶
Three or more -, *, or _ characters on their own line, all producing an
identical <hr>.
Escaping — CommonMark¶
A backslash before a punctuation character forces it to render literally instead of being parsed as syntax.
Escapable characters: \ ` * _ { } [ ] ( ) # + - . ! |
Footnotes — GFM¶
A caret-bracket marker in the text pairs with a definition anywhere else in the document; GitHub.com renders it as a jump-linked superscript.
DNS propagation can take up to 48 hours.[^1]
[^1]: In practice it's usually under an hour with low TTLs.
Raw HTML — CommonMark (+ GFM sanitization)¶
CommonMark passes inline HTML straight through. GFM's disallowed raw HTML extension then escapes a specific list of tags for safety, even though the base parser would otherwise render them.
<details>
<summary>Click to expand</summary>
Hidden content revealed on click.
</details>
<!-- this comment is invisible -->
Tags GFM always escapes: <title> <textarea> <style> <xmp> <iframe>
<noembed> <noframes> <script> <plaintext>
GitHub.com Extras — GitHub.com¶
Web-app rendering behavior, not part of the GFM parsing spec. These only activate inside GitHub.com, in a repository context — a static Markdown renderer built against the GFM spec won't reproduce them.