The Complete Markdown Cheat Sheet (With Copy-Paste Examples)
作者: Salty Deprecated Software Engineer
本文由 AI 辅助创作,并经团队审核以确保准确性和质量。所有技术信息和示例均已验证。
Markdown is the formatting language behind GitHub READMEs, Notion pages, Slack messages, Discord, Reddit, and most documentation sites. It's also what ChatGPT and Claude output by default. If you work in tech in 2026, you use Markdown whether you know it or not.
This cheat sheet covers everything you need. Bookmark it.
Headings
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
More #s = smaller heading. Use H1 for titles, H2 for sections, H3 for subsections.
Text Formatting
**bold text**
*italic text*
***bold and italic***
~~strikethrough~~
`inline code`
> This is a blockquote
Links & Images
[Link text](https://example.com)

[Link with title](https://example.com "Hover text")
The ! before brackets makes it an image instead of a link.
Lists
- Item one
- Item two
- Nested item
1. First
2. Second
3. Third
- [x] Completed task
- [ ] Pending task
Code Blocks
Use `backticks` for inline code
```javascript
function hello() {
console.log("Hello!");
}
```
Replace "javascript" with python, bash, sql, css, etc. for proper highlighting.
Tables
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Row 1 | Data | Data |
| Row 2 | Data | Data |
| Left | Center | Right |
|:-----|:------:|------:|
Colons in the separator row control text alignment.
Horizontal Rules, Footnotes & More
---
Here is a statement[^1].
[^1]: This is the footnote text.
<details>
<summary>Click to expand</summary>
Hidden content here.
</details>
Where Markdown Works
| Platform | Supports |
|---|---|
| GitHub | Full GFM (tables, task lists, footnotes) |
| Notion | Most syntax (paste Markdown, auto-converts) |
| Slack | Partial (bold, italic, code, links, lists) |
| Discord | Most syntax (no tables) |
| Full Markdown in old editor | |
| ChatGPT/Claude | Full — all output is Markdown |
Need to format text quickly? Try our free Text Tools Suite for case conversion, word count, and more.
以 The IT Hustle 的编辑笔名写作——25 年以上笔记本维修技师、系统管理员、存储工程师和软件工程师的经验,如今用在 AI 智能体运维上。每篇文章发布前都经过人工审核,详见编辑准则。
获取最新资讯
第一时间了解新工具、博客文章和更新动态。无垃圾邮件。