GitHub Flavored Markdown: Extensions, Tables, and Task Lists
What Is GitHub Flavored Markdown?
GitHub Flavored Markdown (GFM) is GitHub's extension of the CommonMark specification. It adds features that developers and writers need every day — tables, task lists, strikethrough, autolinks, and stricter HTML filtering.
GFM is not a separate language. It builds on CommonMark as a strict superset: every valid CommonMark document is valid GFM, but GFM adds syntax that CommonMark does not recognize. Most modern Markdown parsers support GFM by default.
GFM vs CommonMark: Key Differences
Understanding what GFM adds helps you write Markdown that works consistently across platforms.
| Feature | CommonMark | GFM |
|---|---|---|
| Tables | No | Yes |
| Task lists | No | Yes |
| Strikethrough | No | Yes |
| Autolinks (bare URLs) | Requires <url> | Automatic |
| Disallowed raw HTML | No filtering | Strips dangerous tags |
| Heading IDs | Not specified | Auto-generated |
If your content uses any feature in the GFM column, you need a GFM-compliant parser. CommonMark parsers will render those sections as plain text or ignore them.
Tables
Tables are the most-requested GFM feature. They turn data into scannable, aligned columns.
Basic Syntax
| Language | Year | Paradigm |
|------------|------|---------------|
| Python | 1991 | Multi-paradigm|
| Rust | 2010 | Systems |
| TypeScript | 2012 | Object-oriented|
Column Alignment
Colons in the separator row control alignment:
| Left | Center | Right |
|:----------|:------------:|-----------:|
| Default | Centered | Numbers |
| Aligned | Text | Align here |
:---— left-aligned (default):---:— center-aligned---:— right-aligned
Table Tips
- You do not need to align pipes visually — parsers ignore extra spaces
- Blank cells are fine:
| | |renders as empty<td>elements - Tables do not support row spans or column spans — use HTML
<table>markup only if absolutely necessary - Keep tables narrow. Wide tables break on mobile; consider bullet lists as an alternative
Task Lists
Task lists add interactive checkboxes to your Markdown. On GitHub, they render as clickable toggles in issues, pull requests, and comments.
Syntax
- [x] Set up CI pipeline
- [x] Write unit tests
- [ ] Add integration tests
- [ ] Deploy to staging
Use Cases
- Pull request descriptions — track what a PR covers at a glance
- Issue templates — give contributors a checklist to follow
- Project READMEs — show progress on planned features
- Meeting notes — assign and track action items
Compatibility Note
Outside GitHub, task lists typically render as static checkboxes (checked or unchecked icons). They are not interactive in static-site generators unless you add custom JavaScript.
Strikethrough
Double tildes strike through text:
This feature is ~~deprecated~~ legacy — use the new API instead.
Renders as: This feature is deprecated legacy — use the new API instead.
Common uses:
- Marking outdated information while keeping it visible for context
- Showing before/after edits in documentation
- Tracking changes in meeting notes without deleting the original
Autolinks
GFM automatically turns bare URLs and email addresses into clickable links — no angle brackets needed.
Visit https://github.com for the source code.
Contact support@example.com for help.
CommonMark requires <https://github.com> syntax. GFM removes that friction.
URL Break Detection
GFM handles URLs that wrap across lines and strips trailing punctuation (periods, commas, parentheses) from links. This prevents sentences like "See https://example.com." from including the period in the URL.
Code Blocks and Syntax Highlighting
GFM supports fenced code blocks with optional language hints — identical to standard Markdown but with better support on GitHub's platform.
```python
def fibonacci(n):
a, b = 0, 1
for _ in range(n):
a, b = b, a + b
return a
```
GitHub-Specific Highlighting
GitHub uses Linguist to detect languages and apply syntax highlighting. Language hints override auto-detection:
| Hint | Language |
|---|---|
js or javascript | JavaScript |
ts or typescript | TypeScript |
py or python | Python |
sh or bash | Shell |
json | JSON |
yaml | YAML |
Always specify the language. Auto-detection fails on short snippets and ambiguous syntax.
Disallowed Raw HTML
GFM strips certain HTML tags from output to prevent security issues. The disallowed list includes:
<script>— prevents script injection<title>— prevents page title manipulation<style>— prevents style injection<textarea>— prevents form manipulation<xmp>— deprecated, potential XSS vector<iframe>— (on some renderers) prevents framing attacks
This is a security feature, not a formatting limitation. If you need these elements, they should come from your template system, not from user-generated Markdown.
GitHub-Only Extensions
Some GFM features work exclusively on GitHub's platform:
- Alerts — callout blocks using
> [!NOTE],> [!WARNING],> [!TIP],> [!CAUTION],> [!IMPORTANT] - Mermaid diagrams — render flowcharts and sequence diagrams from fenced
mermaidcode blocks - Footnotes — GitHub now supports
[^1]footnote syntax in issues and discussions
These features may not render correctly in other Markdown parsers. Check your target platform before relying on them.
Portability Checklist
Before publishing GFM content outside GitHub:
- Test tables in your target renderer — alignment and empty cells vary
- Replace alerts with standard blockquotes if your platform does not support them
- Verify autolinks — some parsers still require angle brackets
- Check task list rendering — interactive vs static behavior differs
- Strip GitHub-only features — Mermaid and alerts need plugin support
Key Takeaways
- GFM extends CommonMark with tables, task lists, strikethrough, and autolinks
- Tables support left, center, and right alignment via colon syntax
- Task lists are interactive on GitHub, static elsewhere
- GFM filters dangerous HTML tags automatically — a baseline security benefit
- Alerts and Mermaid diagrams are GitHub-specific; plan replacements for other platforms
- Always specify code-block language hints for reliable syntax highlighting
Related Guides
Try It Yourself
Put GFM syntax to the test. Open our free Markdown Preview tool, write a table or task list, and see the rendered output in real time — no GitHub repository required.