# Reference-style links (cleaner for long URLs)
Check out [Google][1] and [GitHub][gh].
[1]: https://google.com "Google"
[gh]: https://github.com "GitHub"
Lists
# Unordered list
- Item 1
- Item 2
- Nested item
- Nested item
- Item 3
# Ordered list
1. First
2. Second
3. Third
# Task list (GitHub)
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task
# Definition list (some parsers)
Term
: Definition
Tip: You can use -, *, or + for unordered lists. For ordered lists, the actual numbers don't matter — Markdown auto-numbers them.
Code
Markdown
Description
`code`
Inline code
``code with `backtick` ``
Inline code containing backticks
```language
Fenced code block with syntax highlighting
4 spaces / 1 tab indent
Indented code block
# Fenced code block with language
```javascript
function hello() {
console.log("Hello, world!");
}
```
# Fenced code block with diff highlighting
```diff
- const old = "removed";
+ const new = "added";
```
Tables
| Left | Center | Right |
|--------|:-------:|-------:|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
# Alignment:# :--- left (default)# :---: center# ---: right
Tip: Columns don't need to align in the source. This also works:
|Left|Center|Right|
Blockquotes
> This is a blockquote.
>
> It can span multiple lines.
> Nested blockquotes:
> > Second level
> > > Third level
# GitHub-style alerts
> [!NOTE]
> Useful information that users should know.
> [!TIP]
> Helpful advice for doing things better.
> [!WARNING]
> Urgent info that needs immediate attention.
Horizontal Rules
# Any of these create a horizontal rule:
---
***
___
GitHub-Flavored Markdown
Feature
Syntax
Description
Task lists
- [x] Done
Checkbox lists in issues/PRs
Mentions
@username
Mention a GitHub user
Issue refs
#123
Link to issue/PR by number
Commit refs
abc1234
Link to a commit by SHA
Strikethrough
~~text~~
Strikethrough text
Tables
| a | b |
GitHub supports tables natively
Autolinks
Paste URL directly
URLs are auto-linked
Emoji
:emoji_name:
GitHub emoji shortcodes
Footnotes
[^1]
Add footnotes to text
Collapsed section
<details>
HTML collapsible section
Math (LaTeX)
$E = mc^2$
Inline math expressions
Math block
$$...$$
Block math expressions
Mermaid
```mermaid
Diagrams in code blocks
# Collapsible section
<details>
<summary>Click to expand</summary>
Hidden content goes here.
</details>
# Footnotes
Here is a sentence with a footnote.[^1]
[^1]: This is the footnote content.
Escaping Characters
Use backslash \ to escape Markdown formatting characters:
\*not italic\* → *not italic*
\# not a heading → # not a heading
\[not a link\] → [not a link]
# Characters that can be escaped:# \ ` * _ { } [ ] ( ) # + - . ! |