Cheatsheet: Markdown
Last updated 2026-09-19
Text and structure
Headings use one to six # characters.
Bold, italic, and combined emphasis.
Strikethrough is supported by GitHub Flavored Markdown.
Paragraphs are separated by a blank line.
Create a hard line break with two trailing spaces or a backslash.
Use a horizontal rule to separate sections.
Lists, links, and media
Unordered lists use -, *, or + markers.
Ordered lists use numbers followed by periods. Renderers auto-number regardless of the digits typed.
Nest a list by indenting the sub-item at least two (commonly four) spaces under its parent marker. Ordered and unordered markers can mix across levels.
Continue a list item across multiple paragraphs, or add a code block/quote inside it, by indenting the continuation to match the item's text.
A tight list (no blank lines between items) renders without paragraph tags; a loose list (blank line between/inside items) wraps each item's text in a paragraph, adding spacing.
Task lists use checkboxes in GitHub Flavored Markdown, and nest like any other list.
Inline links use link text and a URL.
Reference-style links keep URLs elsewhere in the document.
Autolinks wrap a bare URL or email in angle brackets to make it clickable without link-text syntax.
Images use link syntax prefixed with an exclamation point.
Code, quotes, and tables
Inline code is wrapped in backticks. Use more backticks around the fence when the code itself contains a backtick.
Fenced code blocks use triple backticks and can include a language hint for syntax highlighting.
Diff-style highlighting in fenced code blocks (supported by many renderers, including GitHub) marks added/removed lines.
Indented code blocks use four leading spaces, but a fenced block is usually preferred since it supports language hints.
Blockquotes start with > and can be nested.
Tables use pipes and a separator row.
Align table columns with colons in the separator row.
Escape a literal pipe character inside a table cell so it isn't read as a column boundary.
Escape Markdown punctuation with a backslash when you need literal characters.