GitHub Flavored Markdown (GFM) Guide - Task Lists, Tables & More
Master GitHub Flavored Markdown (GFM) with task lists, tables, autolinks, strikethrough, and GitHub-specific features. Complete guide for GitHub README and issues.
GitHub Flavored Markdown (GFM) Guide
GitHub Flavored Markdown (GFM) extends standard markdown with powerful features: task lists, tables, autolinks, strikethrough, and GitHub-specific syntax. Master GFM to create professional README files, issues, and documentation on GitHub.
Quick answer: GFM adds tables with | separators, task lists with - [ ] checkboxes, strikethrough with ~~text~~, and automatic linking of URLs. These features render on GitHub, GitLab, and GFM-compatible platforms.
What is GitHub Flavored Markdown?
GitHub Flavored Markdown (GFM) is an extension of standard markdown created by GitHub. It adds features that GitHub users need most: tables, task lists, autolinks, and more.
Why GFM Matters
- GitHub Native: Renders natively on GitHub, GitLab, and Gists
- Task Lists: Interactive checkboxes in issues and pull requests
- Tables: Professional data presentation
- Autolinks: URLs automatically become clickable
- Emoji Support: Shortcodes for common emojis
- Issue References: Link to issues by number
Usage statistics: GitHub hosts 100+ million repositories, all using GFM for README files and documentation.
GFM vs. Standard Markdown
Task Lists
Task lists add interactive checkboxes for tracking work. In GitHub issues and pull requests, checkboxes are clickable.
Basic Syntax
Rendered Output
- Completed task
- Incomplete task
- Another completed task
- Another incomplete task
Nested Task Lists
Task Lists in GitHub Issues
In GitHub issues, task lists track progress:
Clicking checkboxes in GitHub issues automatically updates the task list.
Task Lists for Documentation
Use task lists for tutorials and guides:
Tables
GFM tables use pipe | characters to define columns and rows.
Basic Table
Rendered Output
Alignment in Tables
Add colons : to the separator row for alignment:
Rendered Output
API Documentation Table
Feature Comparison Table
Configuration Table
Table Best Practices
- Keep tables concise: Don't overload with too many columns
- Use meaningful headers: Clear column descriptions
- Align appropriately: Left for text, right for numbers
- Use short content: Long text breaks table layout
- Consider scrolling: For very wide tables, mention horizontal scroll
Autolinks
GFM automatically converts URLs and email addresses to links without special syntax.
URL Autolinks
Rendered: Visit for code hosting Check out for more info
Email Autolinks
Rendered: Contact for help Email with questions
Autolinks vs. Manual Links
When to use:
- Autolinks: When you want to show the full URL
- Manual links: When you want custom link text
Strikethrough Text
GFM adds strikethrough support with double tildes ~~.
Syntax
Rendered Output
This text is struck through
Deprecated feature
Old method
Use Cases
New Method (Recommended)
Use the new API endpoint
Emoji Support
GFM supports emoji shortcodes. GitHub renders these as actual emojis.
Emoji Syntax
Rendered Output
:+1: :sparkles: :rocket: :warning: :note:
Common Emoji Shortcodes
Emoji in Task Lists
Emoji in Commit Messages
Issue References
GFM allows referencing GitHub issues, pull requests, and commits.
Issue References
Rendered Output (on GitHub)
See issue #123 for details Related: #456 Also: issue#789
Pull Request References
Commit References
Cross-Repository References
Issue in Task Lists
User Mentions
Mention GitHub users to notify them. Works in issues, PRs, and comments.
Syntax
Rendered Output (on GitHub)
Thanks @username for the contribution! @another-user, can you review this?
Team Mentions
Mentions in README
Mentions in README files work but don't send notifications (unless in a discussion).
Code Blocks with Syntax Highlighting
GFM supports fenced code blocks with language identifiers for syntax highlighting.
Syntax
Supported Languages
GFM supports 100+ languages including:
- Web: JavaScript, TypeScript, HTML, CSS, Vue, React
- Backend: Python, Java, Go, Rust, Ruby, PHP
- Data: SQL, JSON, YAML, XML, TOML
- DevOps: Bash, Dockerfile, Terraform, Kubernetes
GitHub-Specific Markdown Features
Syntax Highlighting in READMEs
GitHub automatically detects programming languages in README files and applies syntax highlighting to code blocks without language identifiers:
Checking "Create README" automatically commits the change to the issue/PR.
Issue Templates
Use GFM in GitHub issue templates (.github/ISSUE_TEMPLATE/):
Pull Request Templates
Use GFM in PR templates (.github/PULL_REQUEST_TEMPLATE.md):
GFM Best Practices
1. Use Task Lists for Tracking
Task lists are perfect for tracking progress in issues and PRs.
2. Structure Tables Well
Keep tables simple with clear headers. Avoid too many columns or overly long content.
3. Reference Issues and PRs
Link to related issues and PRs using #123 syntax for context.
4. Use Emojis Sparingly
Emojis add personality but don't overuse. Use them for emphasis, not decoration.
5. Write Descriptive Link Text
Use manual links [text](url) with descriptive text instead of relying on autolinks.
6. Test Your Markdown
Use GitHub's preview feature to ensure GFM renders correctly before committing.
Common Pitfalls
Over-Nested Task Lists
Too many levels of nesting make task lists hard to read. Limit to 2-3 levels.
Complex Tables
Avoid complex tables with merged cells or multi-line content. GFM doesn't support merged cells.
Broken Issue References
Issue references like #999999 for non-existent issues show broken links on GitHub.
Emoji Shortcodes Not Working
Some emoji shortcodes aren't supported in all GFM renderers. Test in GitHub first.
Autolinks in Code Blocks
URLs in code blocks with language identifiers won't autolink (they're treated as code).
GFM Compatibility
Platforms Supporting GFM
Fallback for Non-GFM Platforms
If targeting non-GFM platforms, avoid:
- Tables (use HTML or alternative formatting)
- Task lists (use standard lists)
- Autolinks (use manual links)
FAQ
Is GFM the same as standard markdown?
No, GFM extends standard markdown with tables, task lists, autolinks, and more. Standard markdown is simpler but less feature-rich.
Can I use GFM outside of GitHub?
Yes, many platforms support GFM or similar extensions: GitLab, Bitbucket, Discord, and others. However, support varies.
Do task lists work in markdown files?
Yes, but checkboxes are only interactive in GitHub issues and PRs. In README files, they render as static checkboxes.
Can I use custom emojis?
GitHub supports custom emoji syntax :custom-emoji: if the emoji exists in the repository. Otherwise, standard emoji shortcodes only.
What if my table has too many columns?
Consider splitting into multiple tables or using alternative formatting. Very wide tables are hard to read on mobile.
Do autolinks work in code blocks?
No, URLs in fenced code blocks with language identifiers are rendered as code, not links.
Summary
GFM Key Features:
- Task Lists:
- [x]for interactive checkboxes - Tables:
|separated columns with alignment support - Autolinks: URLs and emails automatically become links
- Strikethrough:
~~text~~for deleted content - Emoji:
:shortcode:for common emojis - Issue References:
#123links to GitHub issues - User Mentions:
@usernameto notify users
Best Use Cases:
- GitHub README files
- GitHub issues and PRs
- Technical documentation
- API documentation with tables
- Project tracking with task lists
— Free Monaco-powered editor with GFM support for tables, task lists, and more.
Data sources: GitHub Flavored Markdown specification, GitHub documentation, CommonMark specification.~~
Practice
Try it in the editor.
Open Markdown Visualizer and test the ideas from this article in a live editor with instant preview.