Last updated
Headings
Use hash symbols to create headings from H1 to H6:
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Alternative underline syntax for H1 and H2:
Heading 1
=========
Heading 2
---------
Text Formatting
**Bold text** or __Bold text__
*Italic text* or _Italic text_
***Bold and italic*** or ___Bold and italic___
~~Strikethrough~~
`Inline code`
==Highlighted text== (some flavors)
^Superscript^ (some flavors)
~Subscript~ (some flavors)
Lists
Unordered lists use hyphens, asterisks, or plus signs:
- Item one
- Item two
- Nested item
- Another nested item
- Item three
* Also valid
+ Also valid
Ordered lists:
1. First item
2. Second item
1. Nested ordered item
2. Another nested item
3. Third item
Task lists (GitHub Flavored Markdown):
- [x] Completed task
- [ ] Incomplete task
- [x] Another completed task
Links and Images
Inline link:
[Link text](https://example.com)
[Link with title](https://example.com "Hover title")
Reference-style link:
[Link text][ref-id]
[ref-id]: https://example.com "Optional title"
Image:


Image with link:
[](https://example.com)
Code Blocks
Fenced code blocks with language specification for syntax highlighting:
```javascript
function greet(name) {
return `Hello, ${name}!`;
}
```
```python
def greet(name):
return f"Hello, {name}!"
```
```sql
SELECT * FROM users WHERE active = 1;
```
Indented code block (4 spaces or 1 tab):
This is a code block
indented with 4 spaces
Tables (GitHub Flavored Markdown)
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
Column alignment:
| Left | Center | Right |
|:---------|:--------:|---------:|
| text | text | 42 |
| text | text | 100 |
Blockquotes
> This is a blockquote.
> It can span multiple lines.
> Nested blockquote:
>> This is nested one level.
>>> This is nested two levels.
> **Bold in blockquote**
> - List in blockquote
> - Another item
Horizontal Rules
---
***
___
(Three or more hyphens, asterisks, or underscores)
Escaping Special Characters
Use a backslash to display characters that have special meaning in Markdown:
\*Not italic\*
\**Not bold\**
\# Not a heading
\[Not a link\]
\`Not code\`
\- Not a list item
Characters that need escaping:
\ ` * _ { } [ ] ( ) # + - . !
Footnotes (Extended Markdown)
Here is a sentence with a footnote.[^1]
Another sentence with a footnote.[^note]
[^1]: This is the first footnote.
[^note]: This is a named footnote.
Definition Lists (Extended Markdown)
Term 1
: Definition of term 1
Term 2
: First definition of term 2
: Second definition of term 2
HTML in Markdown
Raw HTML is allowed in most Markdown processors:
This is **Markdown** with <em>HTML</em> mixed in.
<div class="custom-box">
This entire div is raw HTML inside Markdown.
Use HTML for elements Markdown doesn't support:
<kbd>Ctrl</kbd> + <kbd>C</kbd> to copy
<mark>Highlighted text</mark>
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>