Skip to content
Free · No signup · Instant

GitHub Markdown Guide

Every GitHub Flavored Markdown feature in one place. 30+ features with copy-paste syntax and live previews.

30+ featuresGFM compliantUpdated 2026Free forever

Quick Reference

All GitHub markdown syntax at a glance.

FeatureSyntax
Bold**text**
Italic*text*
Bold Italic***text***
Strikethrough~~text~~
Subscript<sub>text</sub>
Superscript<sup>text</sup>
Heading# H1 ... ###### H6
Inline Link[text](url)
Reference Link[text][id]
Autolinkhttps://...
Inline Code`code`
Code Block```\ncode\n```
Syntax Highlight```js\ncode\n```
Unordered List- item
Ordered List1. item
Task List- [ ] todo
Blockquote> text
Alert> [!NOTE]
Table| a | b |
Image![alt](url)
Footnote[^1]
Details<details>...</details>
Mermaid```mermaid\n...\n```

Text Formatting

GitHub supports 6 inline text styles including GFM strikethrough and HTML sub/superscript.

Bold

Make text bold with double asterisks

README.md
bold text

Italic

Emphasize text with single asterisks

README.md
italic text

Bold Italic

Combine bold and italic

README.md
bold italic text

Strikethrough

Cross out text (GFM extension)

README.md
strikethrough text

Subscript

Subscript text using HTML

README.md
H2O

Superscript

Superscript text using HTML

README.md
x2 + y2

Code

Inline code, fenced code blocks, and syntax highlighting for 500+ languages.

Inline Code

Highlight code within a sentence

README.md
git status

Fenced Code Block

Multi-line code with triple backticks

README.md
const hello = 'world'\nconsole.log(hello)

Syntax Highlighting

Add language name for colored highlighting

README.md
def greet(name):\n return f"Hello, {name}!"

Lists

Unordered, ordered, nested, and interactive task lists.

Unordered List

Bullet points with dashes, asterisks, or plus signs

README.md
  • First item
  • Second item
  • Third item

Ordered List

Numbered list items

README.md
  1. First item
  2. Second item
  3. Third item

Nested List

Indent with 2 spaces for sub-items

README.md
  • Parent item
    • Child item
    • Child item
  • Another parent

Task List

Interactive checkboxes (GFM extension)

README.md
  • ☑ Write the code
  • ☑ Run the tests
  • ☐ Update docs

Blockquotes & Alerts

Standard blockquotes plus GitHub's five colored alert callout types.

Blockquote

Quote text with greater-than sign

README.md
This is a blockquote

Nested Blockquote

Multiple levels of quoting

README.md
First level
Nested quote
Deeply nested

Alert — Note & Tip

Informational and helpful callouts

README.md
ℹ️ Note
Useful information that users should know.
💡 Tip
Helpful advice for doing things better.

Alert — Warning, Caution & Important

Urgency and critical information callouts

README.md
⚠️ Warning
Urgent info that needs immediate attention.
🛑 Caution
Negative potential consequences of an action.
💬 Important
Key information users need to know.

Tables

GitHub Flavored Markdown tables with alignment and formatted content.

Basic Table

Pipes for columns, hyphens for header separator

README.md
FeatureStatus
Bold✅ Supported
Tables✅ Supported

Column Alignment

Use colons in the separator row

README.md
LeftCenterRight
ABC
DEF

Formatted Table Content

Use inline formatting inside table cells

README.md
FeatureSyntax
Bold**text**
Italic*text*

Media & References

Images, footnotes, and anchor links for navigation within documents.

Image

Embed images with alt text

README.md
[Image: Screenshot of app]

Footnote

Add references that appear at the bottom

README.md

Here is a statement1.


  1. This is the footnote content.

Anchor Link

Link to a heading within the same document

README.md

Installation

...
Back to top

GitHub-Specific Features

Collapsible sections, mermaid diagrams, and relative file links — unique to GitHub.

Collapsible Section

Expandable content with <details> tag

README.md
Click to expand
Hidden content goes here.
  • Item 1
  • Item 2

Mermaid Diagram

Render diagrams natively in GitHub

README.md
StartDecisionDo it
Rendered as interactive SVG on GitHub

Relative File Link

Link to files within the same repository

Unsupported in GitHub Markdown

Standard features that GitHub strips or does not render.

Underline

No native underline syntax — <u> tags are stripped in most contexts

Embedded Videos

Use linked thumbnail images or GitHub's video upload instead

Custom CSS

GitHub sanitizes all style attributes and <style> tags

Colored Text

No <font> or style-based color support — use diff code blocks for green/red

Pro Tips

1Keyboard Shortcuts in Issues/PRs

Press Cmd/Ctrl+B for bold, Cmd/Ctrl+I for italic, and Cmd/Ctrl+K to insert a link. GitHub's web editor has built-in markdown toolbar buttons too.

2Drag-and-Drop Images

Drag images directly into any GitHub text area (issues, PRs, comments). GitHub uploads them automatically and inserts the markdown image syntax for you.

3Reference Issues and PRs

Type # followed by a number to reference issues/PRs (e.g., #123). Use owner/repo#123 for cross-repository references. These automatically become clickable links.

Fixes #42
See also org/repo#100
4@Mention Users and Teams

Use @username to mention a person or @org/team to mention an entire team. They'll receive a notification and the mention becomes a link to their profile.

5Diff Syntax Highlighting

Use the "diff" language in code blocks to highlight additions (green) and deletions (red). Prefix lines with + or - to mark changes.

```diff
- old line removed
+ new line added
  unchanged line
```
6Permalink to Code

Click a line number on any GitHub file, then press Y to get a permanent link to that exact version. Paste the URL in markdown and GitHub renders it as an embedded code snippet.

Frequently asked questions

Everything you need to know.

1

What is GitHub Flavored Markdown (GFM)?

GitHub Flavored Markdown (GFM) is GitHub's extended version of standard markdown (CommonMark). It adds tables, task lists, strikethrough, autolinks, and alert callouts on top of the standard syntax. GFM is used in READMEs, issues, pull requests, comments, wikis, and discussions.

Ready to format your markdown?

Paste any markdown into our editor. Preview with professional themes. Export to PDF or HTML.