Official Specification
This cheat sheet follows GitHub Flavored Markdown (GFM), the dialect used on GitHub, and stays compatible with the CommonMark core. The full grammar lives in the official specifications:
Headings
Use # signs to create headings. One # for the largest, six for the smallest.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6Text Formatting
Bold, italic, strikethrough, and inline code.
**Bold text**
*Italic text*
***Bold and italic***
~~Strikethrough text~~
`Inline code`Bold text
Italic text
Bold and italic
Strikethrough text
Inline code
Links
Create hyperlinks with inline or reference-style syntax.
[OpenAI](https://openai.com)
[Link with title](https://example.com "Optional title")
<https://automatic-link.com>Images
Embed images with alt text.

Code
How to mark code in Markdown markup: inline code with backticks and fenced blocks with triple backticks.
Here is some `inline code` in a sentence.
```javascript
function hello(name) {
console.log(`Hello, ${name}!`);
}
```
```python
def greet(name):
return f"Hello, {name}!"
```Here is some inline code in a sentence.
function hello(name) {
console.log(`Hello, ${name}!`);
}
def greet(name):
return f"Hello, {name}!"
Lists
Ordered, unordered, and task lists.
### Unordered list
- Item one
- Item two
- Nested item
- Another nested
- Item three
### Ordered list
1. First step
2. Second step
1. Sub-step A
2. Sub-step B
3. Third step
### Task list
- [x] Completed task
- [ ] Pending task
- [ ] Another task- Item one
- Item two
- Nested item
- Another nested
- Item three
- First step
- Second step
- Sub-step A
- Sub-step B
- Third step
- Completed task
- Pending task
- Another task
Tables
Create tables with pipes and dashes.
| Feature | Status | Notes |
| --- | --- | --- |
| Tables | β
| Pipe and dash syntax |
| Alignment | β
| :--, :--:, --: |
| Cell content | β
| Text, links, inline code |
| Left | Center | Right |
| :--- | :---: | ---: |
| Left-aligned | Centered | Right-aligned |
| 1 | 2 | 3 || Feature | Status | Notes |
|---|---|---|
| Tables | β | Pipe and dash syntax |
| Alignment | β | :--, :--:, --: |
| Cell content | β | Text, links, inline code |
| Left | Center | Right |
|---|---|---|
| Left-aligned | Centered | Right-aligned |
| 1 | 2 | 3 |
Blockquotes
Quote blocks of text with the > character.
> This is a blockquote.
> It can span multiple lines.
>
> ## Heading inside a quote
> - Lists work too
> **Nested quotes:**
> > Deeply nested quote
> > > Even deeperThis is a blockquote. It can span multiple lines.
Heading inside a quote
- Lists work too
Nested quotes:
Deeply nested quote
Even deeper
Horizontal Rules
Add a horizontal rule with three or more dashes, asterisks, or underscores.
Text above
---
***
___
Text belowText above
Text below
Strikethrough
Strikethrough text with double tilde marks.
Forum posts often use [s]...[/s] (and [b], [i]) to mark strikethrough - that is BBCode, not Markdown. In Markdown the same effect is written as: ~~text~~
This is ~~deleted text~~ still visible.
~~Entire paragraph that has been struck through for review purposes.~~
Mix of ~~strikethrough~~ and normal text.This is deleted text still visible.
Entire paragraph that has been struck through for review purposes.
Mix of strikethrough and normal text.
