Markdown basics

What Is GitHub Flavored Markdown (GFM)?

GitHub Flavored Markdown, or GFM, is the version of Markdown that GitHub uses for READMEs, issues and pull requests. It is standard Markdown (CommonMark) plus five additions: tables, task lists, strikethrough, automatic links and a short list of HTML tags that get blocked. When a tool says it "supports GFM", those five are what it means. Everything else people associate with GitHub, like alerts, Mermaid diagrams, math and @mentions, sits on top of GFM and is not in the spec.

Two iPhone screens in QuickMark. Left: a release checklist with a table, ticked and unticked task boxes, struck-through text and a Warning alert. Right: a page titled Not the same as GitHub, where one tilde gives subscript, a bare www address is not a link and a math code block shows as plain code
Left: the GFM additions rendering normally. Right: the places where a file written for GitHub looks different elsewhere. Captured in QuickMark on an iPhone 17 Pro simulator while writing this post.

That difference matters as soon as a Markdown file leaves GitHub. A README that looks right on github.com can come out slightly wrong in another app, and it is usually one of a few specific things. So instead of retelling the spec, I took 56 cases, ran each one through QuickMark's own renderer, and checked the results against the GFM spec (version 0.29-gfm) and GitHub's own writing docs. Below you'll find what matches GitHub, what doesn't, and why.

The five things GFM adds

1. Tables

You write
| Step  | Owner | Status |
|:------|:-----:|-------:|
| Build | Ana   | Done   |
| Test  | Ben   | 80%    |
You get
StepOwnerStatus
BuildAnaDone
TestBen80%

The colons in the second row set the alignment: left, center, right. The outer pipes are optional, so a | b over --|-- is a valid table too. Three table rules trip people up, and QuickMark follows the spec on all three:

  • The header and the dashes row must have the same number of cells. Two headers over one |---| is not a table. You get the raw pipes back as a paragraph.
  • Body rows can be short or long. A short row is padded with empty cells. In a long row, the extra cells are silently dropped.
  • A pipe inside backticks still splits the cell. `x | y` in a table becomes two cells. Write x \| y instead. The spec says to escape the pipe "including inside other inline spans", and GitHub does the same.

More on columns, alignment and wide tables in How to Make a Table in Markdown.

2. Task lists

You write
- [x] Bump the version
- [x] Write the notes
- [ ] Tag the release
You get
  • ☑ Bump the version
  • ☑ Write the notes
  • ☐ Tag the release

A capital [X] counts as ticked. The box also works after *, after a number (1. [ ]) and in nested lists. It needs the space inside: [] with nothing in it stays plain text. The full set of checklist tricks is in Markdown checklists.

3. Strikethrough

~~Ship on Friday~~ gives Ship on Friday. This is the first place where GitHub and other apps part ways, and it's covered in the next section.

4. Automatic links

Plain CommonMark only links a URL when you wrap it in angle brackets, like <https://example.com>. GFM also links a bare https://example.com in the middle of a sentence and leaves a trailing full stop out of the link. QuickMark does both. GFM goes one step further and also links www.example.com and user@example.com. QuickMark does not, on purpose. More on that below.

5. Blocked HTML tags

GFM lets you mix HTML into Markdown, but it disarms nine tags: title, textarea, style, xmp, iframe, noembed, noframes, script and plaintext. In QuickMark, all five of the ones I tested (script, iframe, style, title, textarea) show up as visible text instead of running. QuickMark is stricter than the spec here: it only keeps a short allowlist of harmless tags, because it also previews files you didn't write yourself, such as a README in a downloaded repo. Event handlers and javascript: links are removed too.

Where GitHub and other apps differ

QuickMark on iPhone showing: One tilde rendered as subscript, two tildes struck through, a bare www address as plain text, a full https URL as a blue link, a math code fence shown as a plain code block, a $$ block rendered as a formula, and @octocat on #123 as plain text
Every line here renders differently on github.com. This is the honest list of what to change when a file moves off GitHub.
You writeOn GitHubIn QuickMark, and the fix
~gone~Struck out. GitHub's docs say one tilde or two both work.Subscript, the way H~2~O gives H₂O. Fix: use two tildes. They strike text out in every app.
www. addressA linkPlain text. Fix: write the full https:// address.
Bare emailA mailto linkPlain text. Fix: wrap it in angle brackets, <a@b.co>. That is plain CommonMark and works everywhere.
```mathA formulaA plain code block. Fix: use $$ above and below. Both apps render that.
geojson or stl fencesA map or 3D modelThe raw text. No equivalent, keep these on GitHub.
@user #123Links to people and issuesPlain text. They need a GitHub repository behind them, so no app outside GitHub can resolve them.
:shipit:GitHub's own emojiThe shortcode as text. Standard ones like :tada: work in both.
A heading with accentsAnchor keeps the accentsA heading Ünïcode gets the anchor #ncode: letters outside a to z are dropped. Matters only if you link to headings by hand.

Why doesn't QuickMark link a bare www.? It's the price of a different rule. With loose link detection on, a file name like README.md or CLAUDE.md becomes a link to a website, because .md is Moldova's country domain. In notes full of file names, that's far more annoying than typing https://. So QuickMark only links text that starts with a real scheme. If you write a lot of bare www. addresses, GitHub handles that better.

The single-tilde case is the one most likely to bite. A README with ~deprecated~ looks struck through on GitHub and turns into small lowered text in QuickMark. Two tildes avoid the whole question.

GitHub extras that are not in the spec, but work anyway

These all came from GitHub but are not part of GFM. Everything in this table renders in QuickMark exactly as you would write it for GitHub:

QuickMark on iPhone rendering a Mermaid flowchart Draft to Review to Ship, an inline formula A equals pi r squared, a green Tip alert containing a Space key cap, a collapsed Changelog disclosure, and H2O with a party popper emoji
Mermaid, inline math, a Tip alert with a <kbd> key, a <details> block and emoji, all from the same source you'd commit to GitHub.
FeatureSyntaxNotes from testing
Alerts> [!NOTE]All five GitHub types work: NOTE, TIP, IMPORTANT, WARNING, CAUTION. Lowercase [!note] works too. A custom title after the type (> [!NOTE] Heads up) also works in QuickMark, which is Obsidian's style. That one is not listed in GitHub's docs. See blockquotes and callouts.
Footnotes[^1]Numbered, linked both ways. 31 more cases in How to Add Footnotes.
Mermaid diagrams```mermaidSame fence as GitHub. See Mermaid in Markdown.
Math$x$ $`x`$ $$All three GitHub delimiters render, including the backtick form GitHub added for formulas that contain Markdown characters. Only the ```math fence is missing. See math in Markdown.
Collapsible sections<details>Works, including Markdown inside when you leave a blank line after the summary line.
Keys, sub, sup<kbd>, <sub>, <sup>All three render as HTML, the way GitHub's docs show them.
Emoji:tada:Standard shortcodes become the emoji. GitHub's custom ones don't.
Diff highlighting```diffAdded and removed lines are colored.

One thing that is not different, even though people expect it to be: line breaks. In issues and comments, GitHub turns every new line into a line break. In .md files it doesn't, and two lines in a row join into one paragraph. QuickMark behaves like a GitHub .md file. To force a break, end the line with two spaces or a backslash, as GitHub's docs recommend.

Reading a GitHub README outside GitHub

Most of the time you're not writing GFM, you're reading it: a cloned repo, a downloaded project, someone's notes. On a Mac, select the README in Finder and press Space. QuickMark's Quick Look preview renders it with tables, task lists, alerts and diagrams, without opening an app (more in How to Preview Markdown on Mac). On iPhone and iPad there is no Space-bar preview, so you open the file in the QuickMark app instead.

QuickMark on iPhone rendering a Release checklist: an aligned three-column table, two ticked and one empty task box, struck-through Ship on Friday, a Warning alert, an auto-linked https URL and a footnote
All five GFM additions plus an alert and a footnote in one short file.

If the file is something you wrote yourself and want to keep portable, the safe subset is short: two tildes for strikethrough, full https:// links, $$ for display math, and no @mentions outside GitHub. Stick to that, and the same file looks right on GitHub, in QuickMark and in most other Markdown apps. For everything else, the Markdown cheat sheet has every syntax on one page.

QuickMark app icon

Get rendered Markdown previews everywhere

QuickMark is a free, native Markdown app for Mac, iPhone and iPad. Live preview, export and publish built in.