Markdown 语法指南

完整的 Markdown 语法参考,从基础到进阶

基础语法

ElementSyntaxExample
Heading# H1, ## H2, ### H3# Heading 1
Bold**text** or __text__**bold text**
Italic*text* or _text_*italic text*
Strikethrough~~text~~~~strikethrough~~
Link[text](url)[GitHub](https://github.com)
Image![alt](url)![Logo](/logo.png)
Code (inline)`code``console.log()`
Code Block```language```javascript\ncode here\n```
Blockquote> text> This is a quote
Unordered List- item or * item- Item 1\n- Item 2
Ordered List1. item1. First\n2. Second
Horizontal Rule--- or ***---

进阶语法

表格

| Header 1 | Header 2 |
|----------|----------|
| Cell 1   | Cell 2   |
| Cell 3   | Cell 4   |

代码块

\`\`\`javascript
function hello() {
  console.log("Hello, World!");
}
\`\`\`

引用块

> This is a blockquote
> It can span multiple lines
>
> And even have nested content
> > Like this

Tips & Best Practices

  • Use headings (H1-H6) to create a clear document structure
  • Add blank lines between different elements for better readability
  • Use code blocks with language identifiers for syntax highlighting
  • Escape special characters with backslash when needed