Logo
Back to Blog
Development August 8, 2026 9 min read

GitHub Flavored Markdown Cheat Sheet: The Bits That Are GitHub-Only

O

OmniWebKit Team

Developer Tooling

Share:
Article Cover Image

Your table renders as a wall of pipes. Your callout box shows the word NOTE as literal text. Nothing is wrong with your markdown — you are using a guide written for a different flavour of it.

The GitHub Flavored Markdown Cheat Sheet You Actually Need

GitHub adds features on top of standard markdown, and those extras are where things break.

Basic syntax — headings, bold, links, code fences — works everywhere and needs no cheat sheet. This covers what GitHub adds.

FeatureGitHub-only?
TablesYes, an extension
Task listsYes
Alert calloutsYes
Mermaid diagramsYes
FootnotesYes
Emoji shortcodesYes
Autolinked URLsYes
StrikethroughYes

Every row in that table renders as plain text on npm, PyPI, or anywhere else your README is mirrored. Worth knowing before you build a page around one.

To draft and preview markdown freely, our online markdown editor gives you a live pane.

GitHub Alerts and Callouts

Five coloured boxes, built from blockquote syntax.

> [!NOTE]
> Useful information a reader should know.

> [!WARNING]
> Something that could cause a problem.

The five types are NOTE, TIP, IMPORTANT, WARNING and CAUTION. Each gets its own colour and icon.

Two rules trip people up. The marker must be on its own first line, and the whole block must be one blockquote — a blank line between the marker and the text breaks it into a plain quote.

Use one or two per document. A README where every paragraph is a warning box reads like an error log.

Markdown Table Syntax on GitHub

Pipes and a separator row. Alignment goes in the separator.

| Option | Type | Default |
| :--- | :---: | ---: |
| verbose | boolean | false |
| retries | number | 3 |

Left, centre and right come from where the colons sit in the second row. That row is not optional — without it you get literal pipes.

Column widths do not need to line up in the source. Aligning them makes the raw file readable, and GitHub ignores the whitespace entirely.

The real limitation: no multi-line cells. A paragraph inside a table cell needs an HTML break tag, and anything longer than a sentence usually wants to be a list instead.

Collapsible Sections and Footnotes

The details element is the most underused thing in GitHub markdown.

<details>
<summary>Full configuration options</summary>

Markdown inside still works, as long as you leave a blank line
after the summary tag.

</details>

That blank line is mandatory. Without it GitHub treats the contents as raw HTML and your markdown renders as literal text.

Collapsible blocks solve the length problem directly — troubleshooting sections and long option tables can stay in the README without dominating it.

Footnotes work too, using a bracket-caret reference and a matching definition anywhere in the file. Good for citations that would otherwise interrupt a sentence.

Mermaid Diagrams in a GitHub README

A code fence labelled mermaid renders as a diagram.

```mermaid
flowchart LR
  A[Request] --> B{Cached?}
  B -->|yes| C[Return cache]
  B -->|no| D[Fetch and store]
```

No image files, no build step, and the diagram lives in version control as text you can diff. It works in READMEs, issues, pull requests and discussions.

The caveat is portability. Mermaid does not render on npm, PyPI or most mirrors, so a diagram carrying essential information should also exist as an image.

Rendering an SVG version for those cases? Our SVG to PNG converter handles the export.

The Two Rules That Break Silently

Heading anchors and dark mode. Neither gives you an error.

GitHub builds an anchor from each heading by lowercasing it, turning spaces into hyphens and dropping punctuation. Add an emoji to a heading and every link pointing at it stops working, with no warning.

Dark mode is the other one. A logo with dark strokes and a transparent background disappears entirely for roughly half of GitHub users.

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="logo-dark.png">
  <img alt="Project logo" src="logo-light.png">
</picture>

Fully supported, almost never used. We check this on every README we review and it is wrong more often than not.

Badges follow the same portability rules as images — see our markdown badge maker for the syntax.

Wrapping Up

A GitHub flavored markdown cheat sheet is really a list of extensions. Tables, task lists, alerts, mermaid and footnotes are all GitHub additions, and none of them travel.

Remember the two silent failures: emoji in headings breaks anchor links, and transparent logos vanish in dark mode.

Putting a README together? Start with README best practices, or let the readme.md generator assemble the structure.

Frequently Asked Questions

Why does my markdown look different on GitHub than in VS Code?

+
VS Code previews close to the plain CommonMark spec, while GitHub adds its own extensions on top. Tables, task lists, alerts and autolinked URLs are all GitHub additions, so a local preview can be right and still not match.

How much HTML survives inside a GitHub README?

+
Structural tags do — img, details, summary, div, picture, table and align attributes. Script tags, style attributes and most CSS are stripped by GitHub sanitising the output. That is why centred headers use align rather than a style rule.

Why does my heading anchor link break?

+
GitHub builds the anchor from the heading text: lowercase, spaces to hyphens, punctuation dropped. Adding an emoji or a colon changes the generated slug, so an existing link points at nothing.

Do alert callouts work outside GitHub?

+
No. The blockquote syntax with NOTE or WARNING is GitHub-specific, and elsewhere it renders as a plain blockquote with the marker visible as text. It degrades tidily but it does not travel.

Can I use mermaid diagrams anywhere in a repo?

+
GitHub renders them in READMEs, issues, pull requests and discussions. They do not render on npm, PyPI or most mirrors, so a diagram that carries essential information should also exist as an image.

Why do my nested lists lose their indentation?

+
Nesting needs the right number of spaces relative to the parent marker, and GitHub is stricter than some editors. Two spaces usually works for a hyphen list; mixing tabs and spaces is what actually breaks it.

How do I get a line break without a new paragraph?

+
End the line with a backslash, or with two trailing spaces. The two-space version is invisible in a diff and many editors strip it on save, so the backslash is the one that survives code review.

Do emoji shortcodes work everywhere?

+
Only on GitHub. Something like :rocket: is a GitHub feature, so the same file shows the literal text on npm or in an IDE. Paste the real character instead and it works everywhere.

How do I make an image switch with dark mode?

+
Use a picture element with a prefers-color-scheme source and a fallback img. GitHub supports it and hardly anyone uses it, which is why so many logos vanish for dark-mode readers.

Can I use footnotes?

+
Yes, GitHub supports them and they are genuinely useful for citations without breaking the flow. Like alerts, they are an extension, so they render as plain text wherever the file gets mirrored.

Tags

#Markdown#GitHub#Reference#Documentation