Markdown Cheat Sheet

The Markdown syntax developers actually use daily — headings, lists, links, tables, and code blocks — with real examples, common mistakes, and a searchable quick reference.

runs locally on your browser. Your data never leaves your device.
13 sections
25 syntax entries
Searchable quick reference
100% offline

Headings & Emphasis

The syntax you'll use in the first line of nearly every Markdown file you ever write.

# Heading 1
Essential

A # starts a heading — one # for the largest heading, up to six for the smallest (######). Most renderers require a space right after the #.

# Heading 1 ## Heading 2 ### Heading 3

**bold text**
Essential

Wraps text in double asterisks (or double underscores) to make it bold.

*italic text*
Essential

Wraps text in single asterisks (or single underscores) to italicize it.

***bold and italic***
Handy

Triple asterisks combine bold and italic in one go — equivalent to wrapping *** around the text, or nesting ** inside *.

~~strikethrough~~
Handy

Double tildes strike through text. A GitHub Flavored Markdown extension — see Task Lists & GFM Extras below.

ATX vs. Setext headings
The # style shown above (called ATX) is what almost everyone uses today. An older style — Setext — underlines text with ===== for an H1 or ----- for an H2 instead, and still works in most parsers, but only supports two heading levels. Stick with #.
Tip
Leave a blank line before and after a heading. Most renderers don't strictly require it, but it avoids ambiguity with adjacent content — especially a list right above or below it.

Lists

Simple on the surface — the blank-line and indentation rules underneath are where almost every list-rendering surprise comes from.

- item
Essential

An unordered list item. -, *, and + all work identically as the bullet marker — pick one and stay consistent within a document.

- First item - Second item - Third item

1. item
Essential

An ordered list item. The actual numbers you type mostly don't matter — most renderers renumber sequentially starting from the first one, so 1. 1. 1. still renders as 1. 2. 3.

- nested item
Handy

Nest a list by indenting it under a parent item. Indent consistently — commonly 2 or 4 spaces — matching where the parent item's own text starts.

- Parent item - Nested item - Another nested item - Back to top level

A list needs a blank line before it
If a list directly follows a paragraph with no blank line in between, many renderers merge the two into a single paragraph instead of starting a list at all. When in doubt, add the blank line.

Code

Two forms: a short inline span, and a full fenced block for anything longer than a few words.

`inline code`
Essential

Wraps a short code fragment in single backticks, rendered in monospace inline with the surrounding text.

```js
Essential

Three backticks open a fenced code block; the word right after the fence (js, python, bash) hints the renderer which language to syntax-highlight. Close the block with three backticks on their own line.

```js function hello() { console.log("hi"); } ```

Fenced blocks over indented ones
An older convention indents a block by 4 spaces to mark it as code instead of using triple backticks. It still works in most parsers, but fenced blocks are strongly preferred today — they support a language hint for syntax highlighting, and don't require careful indentation tracking, especially inside a list.

Tables

A GitHub Flavored Markdown extension — not part of the original spec, but supported almost everywhere today.

| Header | Header |
Essential

A table row — cells separated by pipe characters. The second row must be a --- separator with the same number of columns before any data rows are recognized as a table at all.

| Name | Role | | --- | --- | | Ada | Engineer | | Grace | Admiral |

:---:
Handy

Colons in the separator row control column alignment: :--- left-aligns, :---: centers, and ---: right-aligns. Plain --- with no colons defaults to left.

Every row needs the same column count
The header row, the separator row, and every data row all need to agree on the number of |-delimited columns — a single missing pipe anywhere is enough to misalign or completely break the table.

Blockquotes & Horizontal Rules

Quoting other text, and visually separating sections.

> quoted text
Essential

A > at the start of a line turns it into a blockquote, typically rendered indented with a vertical line down the left side.

>> nested quote
Advanced

Stack > characters to nest a blockquote inside another one — a blockquote can also contain other Markdown, including headings, lists, or code blocks, by continuing to prefix each of those lines with >.

---
Essential

Three or more hyphens on their own line render a horizontal rule. *** and ___ work identically — pick one and stay consistent.

Task Lists & GFM Extras

GitHub Flavored Markdown extensions on top of the original spec — genuinely useful, but not guaranteed to render everywhere.

- [ ] todo item
Essential

An unchecked task list checkbox. Space between the brackets — a literal, empty space character.

- [x] done item
Essential

A checked task list checkbox — lowercase or uppercase x both work. On GitHub, these render as real, clickable checkboxes in issues and pull requests, not just static ticks.

[^1]
Advanced

A footnote reference. Define its text elsewhere in the document with a matching [^1]: line — supported by GitHub and many extended renderers, not the original spec.

Here's a claim that needs a source.[^1] [^1]: The actual source, at the bottom of the document.

:smile:
Advanced

An emoji shortcode — supported by GitHub, GitLab, and some other renderers, entirely absent from the original Markdown spec.

GFM extras don't render everywhere
Task lists, tables, strikethrough, footnotes, and emoji shortcodes all render fine on GitHub, GitLab, and most modern tools — but a strict CommonMark-only renderer may show the literal syntax as plain text instead of the formatted version. Worth checking if you're writing content for an unfamiliar renderer.

Escaping & Raw HTML

Showing Markdown's own special characters literally, and dropping into HTML for anything Markdown itself can't express.

\*not italic\*
Handy

A backslash immediately before a character that would otherwise trigger formatting escapes it, showing a literal asterisk instead of starting emphasis.

<div>raw html</div>
Advanced

Most Markdown renderers pass raw HTML straight through untouched, letting you drop into HTML for anything Markdown itself can't express.

<br>
Handy

A raw HTML line break — a more visible alternative to the trailing-two-spaces convention covered in the next section.

<!-- comment -->
Advanced

An HTML comment — invisible in the rendered output. Some static site generators also repurpose this exact syntax for their own special directives.

Raw HTML is a real feature, and a real risk
Passing raw HTML straight through is genuinely useful for your own content, but if you're rendering Markdown written by someone else you don't fully trust — a comment box, a wiki page — unsanitized raw HTML is a straightforward way to introduce XSS. Never assume "it's just Markdown" is automatically safe in that situation.

Line Breaks & Front Matter

Two conventions that come up constantly in READMEs and static-site content, without being part of Markdown itself.

line one\
Handy

Ending a line with a single backslash forces a line break within the same paragraph — visible and unambiguous in the source. The older convention, ending a line with two or more trailing spaces, works too, but is invisible in the source and gets silently trimmed by many editors on save, quietly breaking the line break.

--- title: My Post date: 2026-07-08 ---
Advanced

Front matter — a YAML block fenced by --- lines at the very top of a file, read as page metadata (title, date, tags) by static site generators like Jekyll, Hugo, Astro, and Eleventy, before the actual Markdown content begins. Not part of the Markdown spec itself — entirely a convention layered on top by these tools.

Quick Reference

Already comfortable with Markdown — just blanked on a syntax fragment? Search instead of scrolling.

# H1

Largest heading, one # per level up to ######

###### H6

Smallest heading level

**bold**

Bold text

*italic*

Italic text (or _italic_)

***bold italic***

Bold and italic combined

~~strikethrough~~

Strikethrough text

- item

Unordered list item (or * or +)

1. item

Ordered list item — numbers auto-renumber

- nested

Nested list item, indented under its parent

[text](url)

Inline link

[text][ref]

Reference-style link, defined elsewhere in the file

![alt](src)

Image

`code`

Inline code span

```lang

Fenced code block with a language hint

| col | col |

Table row

:---:

Center-align a table column

---:

Right-align a table column

> quote

Blockquote

---

Horizontal rule (or *** or ___)

- [ ] todo

Unchecked task list item (GFM)

- [x] done

Checked task list item (GFM)

[^1]

Footnote reference (GFM/extended)

:smile:

Emoji shortcode (renderer-dependent)

\*

Escape a character to show it literally

<!-- comment -->

HTML comment, invisible in rendered output

25 of 25 commands

Common Use Cases

Real situations, not just isolated syntax — the exact combination that gets you through each one.

You need a README with headings, a code example, and a checklist

Combine three basics into one structured document:

  • ## Section headings for structure
  • Fenced ``` code blocks for install/usage examples
  • - [ ] task list items for a roadmap section

You want a checklist your team can literally check off on GitHub

Task list syntax renders as clickable checkboxes in issues and PRs:

  1. - [ ] First task
  2. - [ ] Second task

Your table isn't rendering — it just shows pipes as plain text

Check the separator row's column count matches the header exactly:

  1. | Name | Role |
  2. | --- | --- |

You need to show Markdown syntax itself, without it being interpreted

Wrap it in a code span or fenced block instead of writing it as live text:

  1. `**not actually bold**`

You want one link reused in several places without repeating the URL

Define it once as a reference, cite it by label everywhere else:

  1. [the docs][docs] ... [again][docs]
  2. [docs]: https://example.com

You need to show a literal < or > without it being read as HTML

Escape it, or keep it inside a code span where Markdown doesn't parse it at all:

  1. `a < b`

Debugging & Troubleshooting

What actually shows up wrong on screen, decoded.

A list merged into the paragraph above it instead of rendering as a list

Add a blank line between the preceding paragraph and the list's first item. Many renderers require that separation to recognize the list as its own block at all.

A nested list turned into a new top-level list instead of nesting

Inconsistent indentation. Use the same number of spaces for every item at a given level — commonly 2 or 4 — and make sure it lines up with where the parent item's own text starts.

A table shows literal pipe characters instead of an actual table

Check that every row — header, separator, and data rows alike — has the same number of | characters, and that a proper --- separator row sits directly under the header row.

Asterisks or underscores show up literally instead of becoming bold or italic

Emphasis markers need to sit directly against the text they wrap, with no space in between. A stray space right after an opening * is a common reason it fails to trigger formatting.

A pasted URL didn't turn into a link, or rendered as a broken one

Not every renderer auto-links a bare URL with no special syntax at all. Wrap it in angle brackets for a guaranteed autolink, or use the full [text](url) form.

HTML tags you typed show up as visible text instead of being invisible or rendered

For an invisible comment, double-check you used the exact <!-- --> syntax. For HTML you actually want rendered, confirm the destination renderer allows raw HTML at all — many strip or escape it entirely for safety.

Things to Remember

If you forget everything else on this page, keep these.

  • A blank line separates block elements (paragraphs, lists, headings) from each other — squeezing them together without one is the single most common rendering surprise.
  • Fenced code blocks (triple backtick) beat indented ones — they support a language hint and don't require careful whitespace tracking.
  • Reference-style links keep long URLs out of your prose and let you reuse the same link everywhere it's cited.
  • Task lists, tables, strikethrough, and footnotes are GitHub Flavored Markdown extensions, not the original spec — they might not render everywhere.
  • A table's separator row needs the same column count as its header row, or the whole table can fail to render.
  • Raw HTML passes straight through most Markdown renderers untouched — powerful for your own content, a real risk if you're rendering someone else's unsanitized.
  • Escape a character with a backslash to show it literally instead of triggering formatting.
  • Indent nested content consistently — inconsistent spacing is the most common reason a nested list or blockquote breaks.
  • Front matter (--- blocks of YAML at the top of a file) is a convention added by static site generators, not something Markdown itself defines.

Common Use Cases

Recall the exact syntax for a reference-style link before writing a long README with repeated URLs
Figure out why a table or nested list isn't rendering the way you expected
Reference which GitHub Flavored Markdown extras might not work on every renderer before relying on one
Search the quick-reference table for a syntax fragment instead of digging through CommonMark's spec

About Markdown Cheat Sheet

Markdown looks trivial right up until a list refuses to nest, a table renders as a literal row of pipe characters, or a checkbox you swore worked on GitHub shows up as plain text somewhere else. Most cheat sheets show only the happy-path syntax and skip the handful of blank-line and whitespace rules that actually cause the confusing failures — the syntax itself was never the hard part.

This one starts with headings and text emphasis, into lists, links and images, code — both inline and fenced blocks — and tables. From there it covers blockquotes and horizontal rules, then GitHub Flavored Markdown's extras (task lists, footnotes, autolinks) that aren't part of the original spec and don't render everywhere, escaping and raw HTML, and the line-break and front-matter conventions that come up constantly in READMEs and static-site content without ever being part of Markdown itself.

Every section calls out the mistakes that actually break rendering: a missing blank line silently merging a list into the paragraph above it, inconsistent indentation turning a nested list into a second top-level one, a table's separator row with the wrong number of columns, GitHub-specific extras that quietly do nothing on a strict CommonMark renderer. There's a searchable quick reference for the moment you already know roughly what you want, and a troubleshooting section built around what actually shows up wrong on screen — literal pipe characters, a merged paragraph, a list that won't nest — not a paraphrase of it.

Like every tool on AllCoreKit, this page is fully static: the quick-reference search filters entirely in your browser, and nothing you read or search for is ever sent anywhere or logged.

Frequently Asked Questions