GitHub Markdown Guide
Every GitHub Flavored Markdown feature in one place. 30+ features with copy-paste syntax and live previews.
Quick Reference
All GitHub markdown syntax at a glance.
| Feature | Syntax | Notes | |
|---|---|---|---|
| Bold | **text** | Double asterisks | |
| Italic | *text* | Single asterisks or underscores | |
| Bold Italic | ***text*** | Triple asterisks | |
| Strikethrough | ~~text~~ | Double tildes (GFM) | |
| Subscript | <sub>text</sub> | HTML sub tag | |
| Superscript | <sup>text</sup> | HTML sup tag | |
| Heading | # H1 ... ###### H6 | Hash + space | |
| Inline Link | [text](url) | Square brackets + parentheses | |
| Reference Link | [text][id] | Define [id]: url elsewhere | |
| Autolink | https://... | Bare URLs auto-link in GFM | |
| Inline Code | `code` | Single backticks | |
| Code Block | ```\ncode\n``` | Triple backticks | |
| Syntax Highlight | ```js\ncode\n``` | Language after backticks | |
| Unordered List | - item | Dash, asterisk, or plus | |
| Ordered List | 1. item | Number + period | |
| Task List | - [ ] todo | Interactive checkboxes (GFM) | |
| Blockquote | > text | Greater-than sign | |
| Alert | > [!NOTE] | NOTE, TIP, WARNING, CAUTION, IMPORTANT | |
| Table | | a | b | | Pipes + header separator row | |
| Image |  | Exclamation + link syntax | |
| Footnote | [^1] | Define [^1]: text at bottom | |
| Details | <details>...</details> | Collapsible sections | |
| Mermaid | ```mermaid\n...\n``` | Diagrams rendered natively |
Text Formatting
GitHub supports 6 inline text styles including GFM strikethrough and HTML sub/superscript.
Bold
Make text bold with double asterisks
Italic
Emphasize text with single asterisks
Bold Italic
Combine bold and italic
Strikethrough
Cross out text (GFM extension)
Subscript
Subscript text using HTML
Superscript
Superscript text using HTML
Headings & Links
Six heading levels and three link formats including GFM autolinks.
Headings
Six levels from H1 (largest) to H6 (smallest)
Heading 1
Heading 2
Heading 3
Heading 4
Inline Link
Link with custom display text
Reference Link
Define URLs separately for cleaner source
Autolink
Bare URLs become clickable automatically (GFM)
Code
Inline code, fenced code blocks, and syntax highlighting for 500+ languages.
Inline Code
Highlight code within a sentence
git statusFenced Code Block
Multi-line code with triple backticks
Syntax Highlighting
Add language name for colored highlighting
Lists
Unordered, ordered, nested, and interactive task lists.
Unordered List
Bullet points with dashes, asterisks, or plus signs
- First item
- Second item
- Third item
Ordered List
Numbered list items
- First item
- Second item
- Third item
Nested List
Indent with 2 spaces for sub-items
- Parent item
- Child item
- Child item
- Another parent
Task List
Interactive checkboxes (GFM extension)
- ☑ 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
This is a blockquote
Nested Blockquote
Multiple levels of quoting
First levelNested quoteDeeply nested
Alert — Note & Tip
Informational and helpful callouts
Useful information that users should know.
Helpful advice for doing things better.
Alert — Warning, Caution & Important
Urgency and critical information callouts
Urgent info that needs immediate attention.
Negative potential consequences of an action.
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
| Feature | Status |
|---|---|
| Bold | ✅ Supported |
| Tables | ✅ Supported |
Column Alignment
Use colons in the separator row
| Left | Center | Right |
|---|---|---|
| A | B | C |
| D | E | F |
Formatted Table Content
Use inline formatting inside table cells
| Feature | Syntax |
|---|---|
| Bold | **text** |
| Italic | *text* |
Media & References
Images, footnotes, and anchor links for navigation within documents.
Image
Embed images with alt text
Footnote
Add references that appear at the bottom
Anchor Link
Link to a heading within the same document
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
Click to expand
- Item 1
- Item 2
Mermaid Diagram
Render diagrams natively in GitHub
Relative File Link
Link to files within the same repository
Unsupported in GitHub Markdown
Standard features that GitHub strips or does not render.
No native underline syntax — <u> tags are stripped in most contexts
Use linked thumbnail images or GitHub's video upload instead
GitHub sanitizes all style attributes and <style> tags
No <font> or style-based color support — use diff code blocks for green/red
Pro Tips
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.
Drag images directly into any GitHub text area (issues, PRs, comments). GitHub uploads them automatically and inserts the markdown image syntax for you.
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
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.
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 ```
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.
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.
Writing a GitHub README?
Generate a polished README.md in minutes — project overview, badges, installation steps, and more.