GitHub Markdown Cheat Sheet

Complete guide to GitHub Flavored Markdown (GFM) syntax

GitHub Flavored Markdown extends standard Markdown with extra features. See our Markdown Cheat Sheet for basic syntax.

GitHub-Specific Features

Task Lists

Interactive checkboxes

- [x] Completed task
- [ ] Incomplete task

Autolinks

URLs become links automatically

https://github.com is auto-linked

Issue/PR Reference

Link to issues and PRs

#123 or user/repo#123

User Mention

Mention and notify users

@username

SHA Reference

Link to commits

a1b2c3d4 or user/repo@a1b2c3d4

Emoji

Emoji shortcodes

:+1: :sparkles: :rocket:

Tables

Basic Table

Simple table

| Header 1 | Header 2 |
|----------|----------|
| Cell 1   | Cell 2   |

Aligned Table

Column alignment

| Left | Center | Right |
|:-----|:------:|------:|
| L    |   C    |     R |

Code Blocks

Syntax Highlighting

Specify language for highlighting

```javascript
const x = 1;
```

Diff Highlighting

Show code changes

```diff
- removed line
+ added line
```

Mermaid Diagrams

Create diagrams

```mermaid
graph TD;
  A-->B;
```

Alerts/Callouts

Note

Informational callout

> [!NOTE]
> Information note

Tip

Tip callout

> [!TIP]
> Helpful tip

Important

Important callout

> [!IMPORTANT]
> Key information

Warning

Warning callout

> [!WARNING]
> Warning message

Caution

Caution callout

> [!CAUTION]
> Dangerous action

Extended Features

Footnotes

Add footnotes

Text with footnote[^1]

[^1]: Footnote content

Collapsed Section

Collapsible content

<details>
<summary>Click to expand</summary>

Hidden content
</details>

Keyboard Keys

Keyboard key styling

<kbd>Ctrl</kbd> + <kbd>C</kbd>

Subscript

Subscript text

H<sub>2</sub>O

Superscript

Superscript text

X<sup>2</sup>

Syntax Highlighting Languages

GitHub supports syntax highlighting for 100+ languages. Common ones include:

javascripttypescriptpythonrubygorustjavaccppcsharpphpswiftkotlinbashsqljsonyamlmarkdownhtmlcss

Related Tools