Markdown Extended Syntax
Basic Markdown syntax provides the essential elements for creating documents, but sometimes that's not enough for specific needs. That's where extended syntax comes in.
Extended syntax adds extra features on top of the basics, allowing you to create richer and more complex documents.
What is Extended Syntax?
Extended syntax refers to syntax elements beyond the original Markdown specification. These extensions are added by different Markdown processors to support additional features.
Common Extended Syntax
- Tables – Create data tables
- Fenced code blocks – Code blocks with syntax highlighting
- Footnotes – Add footnote references
- Heading IDs – Add custom IDs to headings
- Definition lists – Lists of terms and definitions
- Strikethrough – Cross out text
- Task lists – Checklists with checkboxes
- Emoji – Emoji symbols
- Highlight – Highlight text
- Subscript and superscript – Common in math formulas
Support
Note that not all Markdown applications support extended syntax. Before using, check if your Markdown processor supports the extensions you want.
Mainstream Support
The following platforms and tools support extended syntax well:
- GitHub Flavored Markdown (GFM) – GitHub's Markdown extension
- GitLab Flavored Markdown – GitLab's extension
- Typora – Rich text Markdown editor
- Obsidian – Knowledge management tool
- VitePress – Static site generator
- Hugo – Static site generator
Tables
Creating tables is one of the most common extensions:
| Name | Age | Occupation |
|-------|-----|-----------|
| Zhang | 25 | Engineer |
| Li | 30 | Designer |
Name | Age | Occupation |
---|---|---|
Zhang | 25 | Engineer |
Li | 30 | Designer |
Fenced Code Blocks
Code blocks with syntax highlighting:
```javascript
function hello() {
console.log("Hello, World!");
}
```
function hello() {
console.log("Hello, World!");
}
Task Lists
Create to-do lists:
- [x] Complete project plan
- [ ] Write code
- [ ] Test features
- [ ] Deploy online
- [x] Complete project plan
- [ ] Write code
- [ ] Test features
- [ ] Deploy online
Strikethrough
Indicate deleted or incorrect content:
~~This text has strikethrough~~
This text has strikethrough
Autolinks
Automatically recognize URLs and email addresses:
Visit https://markdown.com.cn for more information.
Contact: example@domain.com
Visit https://markdown.com.cn for more information. Contact: example@domain.com
Footnotes
Add notes and references to your document:
Here is an example of a footnote[^1].
[^1]: This is the content of the footnote.
Here is an example of a footnote[^1].
[^1]: This is the content of the footnote.
Definition Lists
Create lists of terms and definitions:
Markdown
: A lightweight markup language
HTML
: HyperText Markup Language
: The standard markup language for creating web pages
Math Formulas
Support for LaTeX-style math formulas:
Inline formula: $E = mc^2$
Block formula:
$$
\sum_{i=1}^n a_i = 0
$$
Charts and Diagrams
Some advanced editors support Mermaid diagrams:
```mermaid
graph TD
A[Start] --> B{Understand?}
B -->|Yes| C[Continue Learning]
B -->|No| D[Read Again]
D --> B
C --> E[End]
```
Learning Path for Extended Syntax
It is recommended to learn extended syntax in the following order:
- Tables – Most common and practical
- Fenced Code Blocks – Essential for programmers
- Task Lists – Great for project management
- Strikethrough – Simple and easy to use
- Footnotes – Needed for academic writing
- Definition Lists – For term explanations
- Heading IDs – Advanced linking
- Highlight – Emphasize key points
Compatibility Notes
When using extended syntax:
- Test compatibility – Test your Markdown on the target platform
- Provide fallbacks – Consider how it displays on platforms that don't support extensions
- Document usage – State which extensions are used in your docs
- Standardize choices – Use a unified set of extensions within your team
Next Steps
Choose the extended syntax you're interested in to start learning: