By · Updated

Markdown Cheat Sheet

CommonMark Syntax With GitHub Tables, Task Lists, Footnotes and Alerts

No ratings yet

Loading…

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the Markdown Cheat Sheet works

This Markdown cheat sheet covers the syntax that works almost everywhere — CommonMark headings, emphasis, lists, links, images, quotes and code — plus the GitHub Flavored Markdown additions such as tables, task lists, strikethrough, footnotes and alerts. The flavour column says which is which. Try any of it in the Markdown previewer linked below.

Using the Markdown cheat sheet

CommonMark is the strict specification that most tools now follow, written in 2014 to settle the ambiguities in John Gruber's original description. GitHub Flavored Markdown is CommonMark plus a few extensions, and it has become the de facto standard for READMEs, issue trackers and chat apps. If a row is marked GFM, check that your target supports it before relying on it.

Blank lines matter

Most surprises in Markdown come from missing blank lines. A list or heading directly after a paragraph line may be read as part of the paragraph; a table needs a blank line above it; and --- under a line of text turns that line into a heading instead of drawing a rule. When output looks wrong, add a blank line before the block.

Line breaks and paragraphs

A single line break inside a paragraph is ignored, so text wrapped in an editor still renders as one paragraph. For a hard break, end the line with two spaces or a backslash; for a new paragraph, leave a blank line. Some chat apps and GitHub comments treat every line break as hard, which is a local rule rather than Markdown.

FAQ

How do I make a table in Markdown?

Write the header cells separated by pipes, then a divider row of hyphens such as |---|---|, then one line per row. Colons in the divider set alignment: :-- left, :-: centre and --: right. Tables are a GitHub Flavored Markdown extension, so plain CommonMark renderers show them as text.

Why is my Markdown not rendering as bold?

Check for spaces inside the markers: ** bold** is not bold, but **bold** is. Underscores inside a word, such as snake_case_names, are deliberately not treated as emphasis in CommonMark. If the text sits inside backticks or an indented block, it is code, and code is never formatted.

Can I print or reuse this Markdown reference?

Yes. Print it, or download the CSV or JSON and include it in your contributor guide. The table is written by OneTask and released under CC0, so you can use it anywhere without a licence or attribution.

See also: all Tech Data tools, Everyday Data.

Related tools