A quick reference for common Markdown syntax plus popular “GitHub-flavored” extras. All examples are formatted in code style so you can copy/paste directly.
Some features (e.g., task lists, tables, footnotes) depend on the platform/renderer. GitHub, GitLab and many wikis support “GFM” (GitHub Flavored Markdown) extensions.
Line breaks: in most Markdown flavors, a newline inside a paragraph becomes a soft wrap. For a hard line break, add two spaces at the end of the line.
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
# symbols.*italic* or _italic_
**bold** or __bold__
~~strikethrough~~
H<sub>2</sub>O (via HTML)
x<sup>2</sup> (via HTML)
- First item
- Second item
- Nested item
- Another nested item
- Third item
1. First item
2. Second item
3. Third item
1. First item
1. Second item
1. Third item
[Microsoft](https://www.microsoft.com)
[Microsoft](https://www.microsoft.com "Official website")
Here is a [link][ref1] and here is another [link][ref2].
[ref1]: https://example.com
[ref2]: https://example.org "Optional title"
https://example.com


<img src="https://example.com/image.png" alt="Alt text" width="240" />
> This is a quote.
> First quoted line
> second quoted line
>
> New paragraph inside the quote
> Key points:
> - Point A
> - Point B
Run `npm install` to install dependencies.
```text
This is a code block.
Put commands, configuration, or output here.
```
```js
function greet(name) {
console.log(`Hello, ${name}!`);
}
```
This is a code block that starts with 4 spaces.
Use it if fenced code blocks are not supported.
`), wrap it using double or triple backticks.---
***
___
| Column A | Column B |
|---------:|:---------|
| Right aligned | Left aligned |
| 123 | Text |
:--- (left), ---: (right), :---: (center).
Avoid very long code inside tables—use separate code blocks instead.
- [ ] Incomplete task
- [x] Completed task
- [ ] Subtask
This is a statement with a footnote.[^1]
[^1]: This is the footnote text.
[Jump to Code](#code)
<a id="my-anchor"></a>
[Jump](#my-anchor)
\*This will not be italic\*
\# This is not a heading
\> This is not a quote
<div>This looks like HTML, but it won't render as HTML.</div>
First line<br>
Second line
<div style="text-align:center">
<strong>Centered text</strong>
</div>
This is the first line␠␠
This is the second line (same paragraph)
- Item 1
This paragraph belongs to the same list item (indented).
- Item 2
> **Note:** This is important information.
---
title: "My document"
date: 2026-04-10
tags: [markdown, reference]
---