Tan Phat Media

Markdown Cheatsheet - Bảng Tra Cứu Cú Pháp Markdown

Tra cứu nhanh các cú pháp Markdown với ví dụ và hướng dẫn

Search Syntax
Headings

H1

Syntax:

# Heading 1

Example:

# My Title

H2

Syntax:

## Heading 2

Example:

## Section

H3

Syntax:

### Heading 3

Example:

### Subsection

H4-H6

Syntax:

#### Heading 4
##### Heading 5
###### Heading 6

Example:

#### Small heading
Text Formatting

Bold

Syntax:

**bold text**

Example:

**important**

Italic

Syntax:

*italic text*

Example:

*emphasis*

Bold + Italic

Syntax:

***bold italic***

Example:

***very important***

Strikethrough

Syntax:

~~strikethrough~~

Example:

~~deleted~~

Inline Code

Syntax:

`code`

Example:

`const x = 10`
Lists

Unordered List

Syntax:

- Item 1
- Item 2
  - Nested item

Example:

- Apple
- Banana

Ordered List

Syntax:

1. First
2. Second
3. Third

Example:

1. Step one
2. Step two

Task List

Syntax:

- [ ] Todo
- [x] Done

Example:

- [x] Complete task
Links & Images

Link

Syntax:

[text](url)

Example:

[Google](https://google.com)

Link with Title

Syntax:

[text](url "title")

Example:

[Link](url "tooltip")

Image

Syntax:

![alt](image.jpg)

Example:

![Logo](logo.png)

Image with Link

Syntax:

[![alt](img.jpg)](url)

Example:

[![Icon](icon.png)](link)
Code Blocks

Code Block

Syntax:

```
code here
```

Example:

```
function hello() {}
```

With Language

Syntax:

```javascript
code
```

Example:

```js
const x = 1;
```

Inline Code

Syntax:

`code`

Example:

Use `npm install`
Tables

Basic Table

Syntax:

| Header 1 | Header 2 |
|----------|----------|
| Cell 1   | Cell 2   |

Example:

| Name | Age |
|------|-----|
| John | 30  |

Aligned Table

Syntax:

| Left | Center | Right |
|:-----|:------:|------:|
| L    | C      | R     |

Example:

| Left | Center | Right |
|:-----|:------:|------:|
Blockquotes

Blockquote

Syntax:

> Quote text

Example:

> This is a quote

Nested Quote

Syntax:

> Quote
>> Nested

Example:

> Level 1
>> Level 2
Horizontal Rules

Horizontal Rule

Syntax:

---

Example:

---

Alternative

Syntax:

***

Example:

***

Alternative 2

Syntax:

___

Example:

___

Markdown Cheatsheet - Bảng Tra Cứu Cú Pháp Markdown Đầy Đủ

Markdown Cheatsheet là bảng tra cứu đầy đủ các cú pháp Markdown với ví dụ và hướng dẫn chi tiết. Từ heading, text formatting, links, images, code blocks, tables đến blockquotes và nhiều syntax khác.

Tính năng nổi bật

Tra cứu cú pháp Markdown đầy đủ
Ví dụ code cho mỗi syntax
Headings từ H1 đến H6
Text formatting: bold, italic, strikethrough
Unordered và ordered lists
Task lists với checkboxes
Links và images syntax
Code blocks với syntax highlighting
Tables với alignment options
Blockquotes và nested quotes
Horizontal rules
Search và filter nhanh
Copy syntax một click
Giao diện dễ đọc, dễ tìm
Hoàn toàn miễn phí

Tại sao cần Markdown Cheatsheet?

Markdown là ngôn ngữ markup đơn giản được sử dụng rộng rãi trong documentation, README files, blog posts, và nhiều platforms như GitHub, Reddit, Discord. Markdown Cheatsheet giúp bạn tra cứu nhanh các cú pháp khi viết, đặc biệt hữu ích cho developers, technical writers, và content creators. Thay vì phải nhớ tất cả syntax, bạn có thể tham khảo cheatsheet này bất cứ lúc nào.

Lợi ích khi sử dụng

  • Tra cứu syntax nhanh chóng khi cần
  • Học Markdown hiệu quả với ví dụ thực tế
  • Tiết kiệm thời gian không cần search Google
  • Copy syntax trực tiếp vào editor
  • Tham khảo offline sau khi load trang
  • Phù hợp cho beginners và experienced users
  • Cập nhật đầy đủ các Markdown flavors
  • Miễn phí, không cần đăng ký

Cách sử dụng Markdown Cheatsheet

  1. 1Mở Markdown Cheatsheet trên trình duyệt
  2. 2Browse qua các categories: Headings, Text Formatting, Lists, etc.
  3. 3Sử dụng search box để tìm syntax cụ thể
  4. 4Xem syntax và example cho mỗi item
  5. 5Click icon Copy để copy syntax vào clipboard
  6. 6Paste syntax vào Markdown editor của bạn
  7. 7Thay thế placeholder text bằng nội dung thực tế
  8. 8Preview Markdown để xem kết quả
  9. 9Bookmark trang để tra cứu sau này
  10. 10Chia sẻ với team members nếu hữu ích

Markdown Flavors và Compatibility

Có nhiều Markdown flavors khác nhau: CommonMark (standard), GitHub Flavored Markdown (GFM), Markdown Extra, và MultiMarkdown. Cheatsheet này cover các syntax được hỗ trợ rộng rãi nhất. GitHub Flavored Markdown thêm features như task lists, tables, và strikethrough. Khi sử dụng Markdown, nên check documentation của platform để biết features nào được support.

Best Practices khi viết Markdown

Khi viết Markdown, nên: sử dụng blank lines để tách sections, consistent spacing cho lists, descriptive alt text cho images, relative links cho internal pages, và code blocks với language specification cho syntax highlighting. Tránh mixing HTML với Markdown trừ khi cần thiết. Sử dụng linters như markdownlint để maintain consistency.

Tools và Editors cho Markdown

Có nhiều editors hỗ trợ Markdown: VS Code với Markdown extensions, Typora (WYSIWYG), Obsidian (note-taking), Notion, GitHub editor, và online editors như StackEdit, Dillinger. Nhiều static site generators như Jekyll, Hugo, Gatsby cũng sử dụng Markdown cho content. Chọn tool phù hợp với workflow của bạn.

Câu hỏi thường gặp (FAQ)

Markdown khác gì HTML?

Markdown là lightweight markup language dễ đọc, dễ viết hơn HTML. Markdown được convert sang HTML khi render. Ví dụ: **bold** trong Markdown tương đương <strong>bold</strong> trong HTML. Markdown phù hợp cho content writing, HTML phù hợp cho complex layouts.

GitHub Flavored Markdown khác gì Standard Markdown?

GitHub Flavored Markdown (GFM) thêm features như: task lists (- [ ] todo), tables, strikethrough (~~text~~), autolinks, và fenced code blocks với syntax highlighting. GFM được sử dụng trên GitHub, GitLab, và nhiều platforms khác.

Có thể sử dụng HTML trong Markdown không?

Có, hầu hết Markdown parsers cho phép embed HTML. Điều này hữu ích khi cần features mà Markdown không support như: custom styling, complex tables, forms, hoặc embedded videos. Tuy nhiên, nên hạn chế sử dụng HTML để giữ Markdown clean và portable.

Làm sao để tạo nested lists trong Markdown?

Sử dụng indentation (2 hoặc 4 spaces) để tạo nested lists. Ví dụ: '- Item 1\n - Nested item\n - Deep nested'. Consistent indentation quan trọng để parser nhận diện đúng structure.

Markdown có hỗ trợ footnotes không?

Standard Markdown không support footnotes, nhưng nhiều flavors như Markdown Extra và MultiMarkdown có support. Syntax: 'Text[^1]' và '[^1]: Footnote content'. Check documentation của platform bạn sử dụng.

Làm sao để escape special characters trong Markdown?

Sử dụng backslash (\) để escape special characters như: \*, \_, \#, \[, \], \(, \). Ví dụ: '\*not italic\*' sẽ hiển thị *not italic* thay vì italic text.

Có thể tạo table of contents tự động không?

Nhiều Markdown processors và editors hỗ trợ auto-generate table of contents từ headings. Syntax thường là [TOC] hoặc [[_TOC_]]. GitHub tự động tạo TOC cho README files. Một số static site generators cũng có plugins cho TOC.

Markdown có phù hợp cho technical documentation không?

Rất phù hợp! Markdown được sử dụng rộng rãi cho technical docs vì: dễ version control với Git, plain text format, focus vào content, và nhiều static site generators support. Tools như MkDocs, Docusaurus, GitBook đều sử dụng Markdown.

Từ khóa liên quan

markdown syntax guidemarkdown tutorialgithub markdownmarkdown table syntaxmarkdown code blockmarkdown cheat sheet pdfcommonmarkmarkdown editormarkdown to htmlmarkdown examples

Hợp tác ngay với Tấn Phát Digital

Chúng tôi không chỉ thiết kế website, mà còn giúp doanh nghiệp xây dựng thương hiệu số mạnh mẽ. Cung cấp dịch vụ thiết kế website trọn gói từ thiết kế đến tối ưu SEO. Hãy liên hệ ngay với Tấn Phát Digital để cùng tạo nên những giải pháp công nghệ đột phá, hiệu quả và bền vững cho doanh nghiệp của bạn tại Hồ Chí Minh.

Công cụ Developer Tools liên quan

Zalo
Facebook
Tấn Phát Digital
Zalo
Facebook