Loam is free and open source for macOS. Your notes stay plain Markdown files on your disk. Download for macOS.[Download for macOS.]
โ† Blog
Last updated Nov 3, 2026

Markdown cheat sheet: every syntax you need (2026)

A Markdown cheat sheet with every common syntax: headings, lists, links, code, tables and task lists, and which parts are CommonMark or GitHub-flavored.

By Loam teamProduct

Markdown is plain text with a few symbols: # makes a heading, **bold** makes bold text, - starts a list, [text](url) makes a link and backticks make code. This cheat sheet lists every common syntax with an example, and it marks which parts are standard CommonMark and which come from GitHub Flavored Markdown (GFM). Loam is our app, a free and open source Markdown notebook for macOS, and it reads CommonMark with the GFM extensions.

The Markdown syntax cheat sheet

Copy from this table, then read the section for the syntax you need. Rows marked GFM work on GitHub and in any app that supports GitHub Flavored Markdown.

ElementSyntaxResult
Heading# Heading 1 to ###### Heading 6A heading, from the largest level to the smallest
Bold**bold**Bold text
Italic*italic* or _italic_Italic text
Strikethrough (GFM)~~struck~~Text with a line through it
Bulleted list- ItemA list with bullets
Numbered list1. ItemA list with numbers
Task list (GFM)- [ ] To do and - [x] DoneAn open box and a checked box
Link[label](https://example.com)A clickable link
Image![alt text](image.png)An image, with alt text for screen readers
Inline codeOne backtick on each side of the textText in a monospace font
Code blockThree backticks, an optional language name, the code, three backticksA block of code, with highlighting where the app supports it
Block quote> QuoteAn indented quotation
Horizontal rule---A line across the page
Table (GFM)| Name | Role |A table, with a row of hyphens under the header row
Footnote (GitHub)[^1] and [^1]: TextA numbered note at the bottom of the page

Syntax checked against the CommonMark quick reference and GitHub's formatting docs on 2026-11-03.

How do you write headings in Markdown?

Start the line with one to six # characters and a space. One # is the top level and six is the smallest. CommonMark also accepts an underline of equals signs (level 1) or hyphens (level 2) under the text, but the # form is the one most people use.

# Project plan

## Goals

### Open questions

On GitHub every heading is also a link target. [Goals](#goals) jumps to the ## Goals heading in the same file, because GitHub lowercases the heading and replaces spaces with hyphens.

How do you make text bold, italic or struck through?

Wrap the text in asterisks or underscores. One pair makes italic, two pairs make bold, and three pairs make both. Strikethrough uses two tildes and comes from GFM, so original Markdown and plain CommonMark have no syntax for it.

StyleSyntaxDefined in
Italic*text* or _text_CommonMark
Bold**text** or __text__CommonMark
Bold and italic***text***CommonMark
Strikethrough~~text~~GFM

GitHub also accepts a single tilde for strikethrough, but the double form is the safer choice. To show a symbol such as an asterisk without formatting, put a backslash before it: \*.

How do lists and task lists work in Markdown?

Start a line with -, * or + for a bulleted list, or with a number and a period for a numbered one. Indent a line under the text of its parent to nest it. A task list is a bulleted list where each item starts with [ ] for an open task or [x] for a done one, and it is a GFM feature.

- Apples
- Oranges
  - Blood oranges

1. Wake up
2. Write notes

- [ ] Draft the plan
- [x] Send the plan

A link is the label in square brackets followed by the address in parentheses. An image is the same thing with a ! in front, and the label becomes the alt text. CommonMark also has reference links, where the address is defined once on its own line. GFM turns a bare web address into a link without any syntax.

[Loam docs](https://example.com/docs)

[Loam docs][1]

[1]: https://example.com/docs

![Screenshot of a vault](images/vault.png)

<https://example.com>

Relative links point to other files. On GitHub, [Guidelines](docs/CONTRIBUTING.md) opens a file in the same repository, and the same idea links one note to another in a folder of notes.

How do you format code and block quotes?

Put one backtick on each side of a short piece of code. For a block, put three backticks on the line before and the line after, and add a language name after the first three to get syntax highlighting. CommonMark also treats a block indented by four spaces as code. A line that starts with > is a block quote.

Run `npm test` before you push.

```bash
npm test
```

> Notes are plain text files.
> Any editor can open them.

GitHub adds alerts on top of block quotes. A quote whose first line is > [!NOTE], > [!TIP], > [!IMPORTANT], > [!WARNING] or > [!CAUTION] renders as a colored callout on GitHub. An app without alert support shows it as an ordinary quote, so the text stays readable.

How do you write a table in Markdown?

Separate the columns with pipes, and put a row of hyphens under the header row. Colons in that row set the alignment: :--- is left, :---: is centered and ---: is right. Leave a blank line before the table, or it will not render. Tables are a GFM extension, so they are not part of CommonMark.

| Item   | Qty   | Price |
| :----- | :---: | ----: |
| Widget | 2     | 4.50  |
| Gadget | 10    | 1.25  |

Use at least three hyphens in each column of the separator row. Links, code, bold and italic text all work inside cells. A pipe that should appear as text needs a backslash in front of it, or it ends the cell.

Rules, line breaks and footnotes

Three or more --- or *** on a line of their own draw a horizontal rule. Leave a blank line above ---, because directly under a line of text it turns that line into a level 2 heading. A single newline inside a paragraph does not start a new line. To force one, end the line with two spaces or a backslash, or leave a blank line for a new paragraph.

A footnote has two parts: a marker such as [^1] in the text, and a definition such as [^1]: Footnote text. anywhere in the file. GitHub renders the definitions at the bottom of the page, but not in wikis. Neither the CommonMark spec nor the GFM extension list includes footnotes, so test them in your tool before you rely on them.

First line\
Second line

---

Markdown is portable.[^1]

[^1]: A footnote can be defined anywhere in the file.

CommonMark, GFM and original Markdown: what differs?

John Gruber wrote the original Markdown syntax description. It leaves details open, so apps rendered the same file in different ways. CommonMark is a strict specification of the core syntax, and its current version is 0.31.2. GFM is CommonMark plus a few extensions, and its spec (version 0.29-gfm) lists tables, task list items, strikethrough, autolinks and disallowed raw HTML. Tables, task lists and strikethrough are GFM extensions, so an app that only reads CommonMark may show them as plain text.

SyntaxOriginal MarkdownCommonMarkGFM
Headings, emphasis, links, images, block quotesYesYesYes
Lists and horizontal rulesYesYesYes
Fenced code blocksNo, indented code onlyYesYes
TablesNoNoYes
Task listsNoNoYes
StrikethroughNoNoYes
Bare web addresses as linksNoNoYes
FootnotesNoNoNot in the spec; GitHub renders them
Alerts such as > [!NOTE]NoNoNot in the spec; a GitHub feature

From the original syntax page, the CommonMark spec and the GFM spec, read on 2026-11-03.

Sources: CommonMark: quick reference โ†— ยท CommonMark specification โ†— ยท GitHub Flavored Markdown spec โ†— ยท GitHub Docs: basic writing and formatting syntax โ†— ยท GitHub Docs: organizing information with tables โ†— ยท Daring Fireball: Markdown syntax documentation โ†—

What does Loam read, and what does it add?

Loam reads CommonMark with the GFM extensions: headings, lists, tables, task lists and code blocks. It also reads YAML frontmatter, the properties between two --- lines at the top of a note, and links to notes. On top of that, Loam reads a few conventions that live in plain text on the line, so the note stays a normal Markdown file.

---
status: doing
created: 2026-10-28
tags: [project, work]
---

# Plan

- [ ] Ship the beta ๐Ÿ“… 2026-11-20 #work โซ
- [x] Write the plan โœ… 2026-10-17
You writeLoam reads it as
๐Ÿ“… 2026-11-20 or due:2026-11-20The due date of a task
โซ or !highHigh priority
๐Ÿ”ฝ or !lowLow priority
โœ… 2026-10-17The date a task was done; Loam writes it when you check the task
#work or #work/callsA tag; a filter on #work also finds #work/calls
tags: [project, work]Tags in the frontmatter; both forms count
@tomorrow or @friTyped in a note, it writes the due date for you

From the Loam docs: Write and organize notes, and Tasks.

Loam also keeps callouts in the GitHub alert form. When you import an Obsidian vault, its callouts become GitHub alerts such as > [!NOTE], so the notes read the same on GitHub. The importer is described in Import notes.

Does Markdown work the same in every app?

The core syntax does. A Markdown note is a .md text file, so Loam, Obsidian, GitHub and a terminal can all open the same file. What differs is how each app renders the extensions, such as footnotes or alerts. For notes you want to keep for years, stay with CommonMark and GFM, the two forms that most tools agree on.

That portability is the reason Loam stores every note as Markdown. Why Markdown is still the right format covers the argument, and Best Markdown editors for Mac compares the apps that edit these files.

Try Loam

Loam is free and open source. One command installs it, as described in Install Loam, and you can open any folder of Markdown files as a vault, as shown in Your first vault. Loam runs on macOS 26 or later, on Apple silicon, and has no iPhone or Android app. To see how it sits next to a dedicated Markdown editor, read Loam vs Typora, or browse all comparisons.