Home/Docs/GitHub Flavored Markdown (GFM)

GitHub Flavored Markdown (GFM)

GitHub Flavored Markdown (GFM) is GitHub's enhanced version of standard Markdown. It extends the original Markdown syntax with additional features designed specifically for developers, documentation, and collaborative software projects.

If you've ever written a **README.md**, GitHub Wiki, Issue, Pull Request, or Discussion, you've likely used GitHub Flavored Markdown.

GFM is based on the CommonMark specification while adding several GitHub-specific features such as tables, task lists, strikethrough, syntax highlighting, automatic URL linking, footnotes, emoji support, and heading anchors. These additions make GFM the most widely used Markdown implementation today.

Practice as you read: Open the Markdown Editor to write GitHub Flavored Markdown with live preview, keep the Markdown Cheat Sheet open for quick syntax lookup, or use the README Generator to scaffold a professional README instantly.

Open EditorDownload PDF

What Is GitHub Flavored Markdown?

GitHub Flavored Markdown, commonly abbreviated as GFM, is the Markdown dialect used across GitHub.

Unlike the original Markdown created by John Gruber, GFM includes several extensions that make technical documentation easier to write and easier to read.

Today, many documentation platforms, static site generators, note-taking applications, and Markdown editors support GFM because of its simplicity and flexibility.

For a practical introduction to Markdown fundamentals, start with Markdown Basics. For GitHub README workflows and repository documentation, see the GitHub Markdown guide.

GFM vs Standard Markdown

Standard Markdown provides basic formatting features such as:

  • Headings
  • Paragraphs
  • Lists
  • Links
  • Images
  • Blockquotes
  • Inline code
  • Code blocks

GitHub Flavored Markdown builds on those basics and adds modern documentation features.

Feature Standard Markdown GitHub Flavored Markdown
Tables โŒ โœ…
Task Lists โŒ โœ…
Syntax Highlighting Limited โœ…
Strikethrough โŒ โœ…
Footnotes โŒ โœ…
Auto URL Links โŒ โœ…
Heading Anchors Limited โœ…

For most projects, GitHub Flavored Markdown is the recommended choice.

See the complete Markdown Syntax reference for standard formatting rules and how they compare to extended Markdown features.

GFM vs CommonMark

Many users confuse CommonMark with GitHub Flavored Markdown.

CommonMark is a standardized Markdown specification that defines how Markdown should be parsed consistently across platforms.

GitHub Flavored Markdown is an extension of CommonMark. It follows the CommonMark specification while adding GitHub-specific features for documentation and collaboration.

In simple terms:

  • CommonMark defines the foundation.
  • GitHub Flavored Markdown adds extra capabilities on top of it.

This is why every GFM document is largely compatible with CommonMark, but not every CommonMark parser supports all GitHub-specific features.

Tables

One of the biggest improvements over standard Markdown is table support.

Deep dive: Read the complete Markdown Tables guide for syntax, alignment, GitHub compatibility, limitations, and best practices.

| Framework | Language |
|-----------|----------|
| React | JavaScript |
| Laravel | PHP |
| Django | Python |

Output

Rendered Output

Framework Language
React JavaScript
Laravel PHP
Django Python

Tables are commonly used for:

  • Feature comparisons
  • API documentation
  • Configuration references
  • Version compatibility
  • Browser support
  • Pricing comparisons

Task Lists

GitHub Flavored Markdown supports interactive task lists.

Deep dive: Read the complete Markdown Task Lists guide for nested checklists, mixed lists, GitHub interactive checkboxes, and platform compatibility.

- [x] Repository created
- [x] README completed
- [ ] Documentation finished
- [ ] Release published

Output

Rendered Output

  • Repository created
  • README completed
  • Documentation finished
  • Release published

Task lists work in:

  • README files
  • Issues
  • Pull Requests
  • Discussions
  • GitHub Projects

They are ideal for project planning and progress tracking.

Syntax Highlighted Code Blocks

GFM supports fenced code blocks with syntax highlighting.

Deep dive: Read the complete Markdown Code Blocks guide for fenced-block syntax, language identifiers, and copy-friendly examples.

```javascript
function hello() {
  console.log("Hello World");
}
```

GitHub automatically highlights supported languages including:

  • JavaScript
  • TypeScript
  • Python
  • PHP
  • Java
  • Go
  • Rust
  • C#
  • C++
  • HTML
  • CSS
  • SQL
  • JSON
  • YAML
  • Bash

Syntax highlighting improves readability, especially in technical documentation.

Automatic URL Linking

GitHub automatically converts plain URLs into clickable links.

https://github.com

Output

Rendered Output

You can also create descriptive links. See Markdown Links for inline, reference, and relative link syntax.

[GitHub Documentation](https://docs.github.com)

Output

Rendered Output

Descriptive links usually provide a better reading experience than raw URLs.

Strikethrough

GitHub supports strikethrough formatting.

~~Deprecated feature~~

Output

Rendered Output

Deprecated feature

Strikethrough is useful for completed tasks, deprecated features, and outdated information.

Emoji Support

GitHub supports both Unicode emojis and emoji shortcodes.

:rocket:

:tada:

:fire:

:white_check_mark:

:warning:

Output

Rendered Output

๐Ÿš€

๐ŸŽ‰

๐Ÿ”ฅ

โœ…

โš ๏ธ

Emojis help make documentation more engaging while drawing attention to important information.

Footnotes

GitHub Flavored Markdown supports footnotes for citations and additional notes.

Deep dive: Read the complete Markdown Footnotes guide for numbered and named references, multiple footnotes, and platform compatibility.

Markdown supports footnotes.[^1]

[^1]: This is a GitHub Flavored Markdown feature.

Footnotes allow you to include extra information without interrupting the flow of your main content.

GitHub-Specific Features

In addition to standard GFM syntax, GitHub provides several platform-specific features that make collaboration easier.

These features are available in repositories, issues, pull requests, discussions, and many README files.

@Mentions

You can notify another GitHub user by mentioning their username.

@username

GitHub automatically creates a link to the user's profile and sends them a notification.

This feature is widely used during code reviews and project discussions.

Issue and Pull Request References

Reference an issue or pull request using its number.

#25

Or reference another repository.

owner/repository#25

GitHub automatically converts these references into clickable links.

Commit References

You can reference commits using their SHA.

9fceb02

GitHub links directly to the referenced commit, making it easier to discuss code changes.

Relative Links

One of the biggest advantages of GitHub Markdown is support for relative links.

Deep dive: Read the complete Markdown Links guide for relative paths, reference links, and email links.

[Installation Guide](docs/installation.md)

[API Documentation](docs/api.md)

Relative links continue working even when repositories are cloned locally.

They are recommended for linking internal documentation.

Heading Anchors

GitHub automatically generates anchor links for headings.

See Markdown Headings for hierarchy rules, anchor links, and README structure.

Example:

## Installation

can be linked as:

[Jump to Installation](#installation)

Anchor links improve navigation inside long README files and documentation.

Supported HTML Elements

GitHub Flavored Markdown allows several HTML elements when Markdown alone is not sufficient.

Deep dive: Read the complete Markdown HTML guide for supported tags, security restrictions, and advanced formatting.

Commonly used tags include:

  • <details>
  • <summary>
  • <kbd>
  • <sub>
  • <sup>
  • <br>

Example:

<details>
<summary>Installation Steps</summary>

Run:

npm install

</details>

Output

Rendered Output

Installation Steps

Run:

npm install

The <details> element is one of the most popular GitHub features because it creates expandable content without requiring JavaScript.

Where Is GitHub Flavored Markdown Supported?

GitHub Flavored Markdown is supported in many places beyond GitHub itself.

Popular platforms include:

  • GitHub
  • GitHub Enterprise
  • GitHub Pages
  • VS Code Markdown Preview
  • Obsidian
  • MkDocs
  • Docusaurus
  • Hugo
  • Jekyll
  • Many online Markdown editors

Because GFM has become the de facto standard, learning it allows you to write documentation that works across numerous developer tools and platforms.

GitHub Flavored Markdown Best Practices

Following a few best practices will make your README files and documentation more professional, easier to maintain, and more useful for contributors.

Organize Content with Headings

Use a logical heading hierarchy throughout your documentation. See Markdown Headings for hierarchy rules and anchor links.

# Project Name

## Features

## Installation

## Usage

## Configuration

## Contributing

## License

Well-structured headings improve readability and allow GitHub to generate useful heading anchors.

Prefer Relative Links

When linking files inside your repository, use relative paths instead of full GitHub URLs.

Recommended:

[Installation Guide](docs/installation.md)

Instead of:

https://github.com/username/project/blob/main/docs/installation.md

Relative links continue working even if the repository is forked or cloned locally.

Write Descriptive Link Text

Instead of using generic text like Click here, use descriptive links.

Read the Installation Guide

This improves accessibility and helps users understand where the link leads.

Keep Code Examples Small

Include short, focused examples instead of large code dumps.

Good documentation explains concepts using simple examples that readers can quickly understand and copy.

Use Syntax Highlighting

Always specify the programming language for fenced code blocks. See Markdown Code Blocks for language identifiers and supported languages.

```bash
npm install
npm run dev
```

This enables GitHub's syntax highlighting and makes code easier to read.

Add Screenshots

Visual documentation is often easier to understand than text alone. See Markdown Images for paths, alt text, and GitHub asset URLs.

Common examples include:

  • Dashboard previews
  • Application screenshots
  • CLI output
  • Architecture diagrams
  • Workflow illustrations

Images make README files significantly more engaging.

Use Tables for Structured Data

Instead of writing long paragraphs, use tables for structured information. See Markdown Tables for alignment and formatting.

Examples:

  • Feature comparisons
  • Browser compatibility
  • API parameters
  • Configuration options
  • Version support

Tables are easier to scan and improve the overall reading experience.

Keep Documentation Updated

Outdated documentation causes confusion.

Whenever you release new features or update your project, review your README and documentation to ensure that installation steps, commands, screenshots, and examples remain accurate.

Keeping documentation current builds trust and improves the developer experience.

Common GitHub Flavored Markdown Mistakes

Even experienced developers occasionally make mistakes when writing GitHub Flavored Markdown. Avoiding these common issues will make your documentation cleaner and easier to maintain.

Confusing Standard Markdown with GFM

Many tutorials teach basic Markdown but omit GitHub-specific features.

Remember that GitHub Flavored Markdown supports additional syntax such as:

  • Tables
  • Task Lists
  • Strikethrough
  • Footnotes
  • Automatic URL Linking

If you're writing documentation specifically for GitHub, prefer GFM features whenever they improve readability.

Forgetting Language Identifiers

Incorrect:

```
console.log("Hello");
```

Correct:

```javascript
console.log("Hello");
```

Adding the language enables syntax highlighting and improves readability. See Markdown Code Blocks for supported languages.

Using Absolute GitHub Links

Instead of:

https://github.com/username/project/blob/main/docs/setup.md

Use:

[Setup Guide](docs/setup.md)

Relative links continue working when the repository is cloned or forked.

Writing Large Walls of Text

Avoid long paragraphs without headings.

Instead:

  • Break content into sections.
  • Use lists where appropriate.
  • Add tables for structured information.
  • Include examples after explanations.

Readable documentation encourages users to continue reading.

Ignoring Accessibility

Always provide descriptive alt text for images. See Markdown Images for best practices.

Instead of:

![](dashboard.png)

Use:

![Project Dashboard](dashboard.png)

Accessible documentation benefits all users and follows good documentation practices.

Overusing HTML

GitHub supports HTML, but Markdown should remain your primary formatting language.

Only use HTML elements such as <details> or <kbd> when Markdown cannot achieve the desired result. See Markdown HTML for supported tags and security restrictions.

Keeping documentation mostly in Markdown improves portability across different editors and platforms.

Not Testing Markdown

Before publishing documentation, preview it in GitHub or a Markdown editor.

Check that:

  • Tables render correctly
  • Images load properly
  • Links work
  • Code blocks display as expected
  • Heading anchors function correctly
  • Task lists render properly

Previewing helps catch formatting issues before users see them. Open the Markdown Editor to verify rendering before you publish.

Practice GitHub Flavored Markdown

The best way to learn GitHub Flavored Markdown is by writing it yourself.

Open the Markdown Editor to experiment with tables, task lists, strikethrough, code blocks, footnotes, and HTML elements while previewing the rendered output in real time. Keep the Markdown Cheat Sheet nearby for quick syntax lookup.

To scaffold a professional README quickly, use the README Generator โ€” then refine the Markdown with tables, task lists, and installation steps from this guide.

Try building a README that includes:

  • A clear title and description with heading anchors
  • A feature comparison table
  • A release checklist with task lists
  • Syntax-highlighted code blocks with language identifiers
  • At least one footnote for additional context
  • A collapsible <details> section for optional setup steps

Summary

GitHub Flavored Markdown (GFM) is the modern standard for writing documentation on GitHub and many other developer platforms.

In this guide, you learned:

  • What GitHub Flavored Markdown is
  • GFM vs Standard Markdown
  • GFM vs CommonMark
  • Tables, task lists, and syntax-highlighted code blocks
  • Automatic URL linking, strikethrough, emojis, and footnotes
  • GitHub-specific features such as @mentions, issue references, and relative links
  • HTML support and heading anchors
  • Best practices and common mistakes
  • Frequently asked questions

Whether you're creating a professional README, writing technical documentation, contributing to open-source projects, or building documentation websites, mastering GitHub Flavored Markdown will help you produce cleaner, more maintainable, and more professional documentation.

Continue Learning

Continue learning Markdown with these guides:

Available now

Coming soon

  • README Guide โ€” templates, structure, and professional README workflows
  • Markdown Line Breaks โ€” spacing rules and hard line breaks

The best way to learn GitHub Flavored Markdown is by writing it yourself. Open the Markdown Editor to experiment with GFM formatting while previewing the rendered output in real time.

Frequently Asked Questions

  1. 1

    What is GitHub Flavored Markdown (GFM)?

    GitHub Flavored Markdown (GFM) is GitHub's enhanced version of Markdown. It extends standard Markdown with additional features such as tables, task lists, syntax highlighting, footnotes, automatic URL linking, and strikethrough text. Today, GFM is the most widely used Markdown implementation for software documentation.

  2. 2

    Is GitHub Flavored Markdown different from Markdown?

    Yes. Standard Markdown provides basic formatting features such as headings, lists, links, and images. GitHub Flavored Markdown adds many developer-focused features including tables, task lists, footnotes, strikethrough, syntax highlighting, automatic URL linking, and heading anchors.

  3. 3

    Is GitHub Flavored Markdown based on CommonMark?

    Yes. GitHub Flavored Markdown follows the CommonMark specification while adding several GitHub-specific extensions for documentation and collaboration.

  4. 4

    Where can I use GitHub Flavored Markdown?

    GFM works in GitHub README files, Wikis, Issues, Pull Requests, Discussions, and GitHub Pages. Many documentation tools also support GFM, including Docusaurus, MkDocs, Hugo, Jekyll, Obsidian, and VS Code Markdown Preview.

  5. 5

    Does GitHub Flavored Markdown support tables?

    Yes. Tables are one of the most popular GFM features and are widely used in technical documentation, API references, comparison guides, and README files.

  6. 6

    Does GFM support task lists?

    Yes. Task lists are supported throughout GitHub and are commonly used for project planning, issue tracking, release checklists, and documentation.

  7. 7

    Can I use HTML in GitHub Flavored Markdown?

    Yes. GitHub supports a safe subset of HTML elements, including details, summary, kbd, sub, sup, and br. These elements provide additional formatting options beyond standard Markdown.

  8. 8

    Does GFM support syntax highlighting?

    Yes. Specify the programming language after the opening triple backticks to enable syntax highlighting for hundreds of supported programming languages.

  9. 9

    Is GitHub Flavored Markdown the best Markdown version?

    For most developers, yes. Because of its extensive feature set and broad compatibility, GFM has become the preferred Markdown format for documentation, open-source projects, and software development.

  10. 10

    Should I learn Standard Markdown or GFM?

    Start by learning standard Markdown because it provides the foundation. Then learn GitHub Flavored Markdown to take advantage of advanced features like tables, task lists, footnotes, and syntax-highlighted code blocks.