Syntax Examples
Comprehensive Markdown syntax examples with side-by-side rendered previews — headings, emphasis, lists, blockquotes, links, images, tables, code blocks and more, helping you master Markdown quickly.
#Basic Formatting
Headings
Markdown Source
# Heading Level 1 ## Heading Level 2 ### Heading Level 3 #### Heading Level 4 ##### Heading Level 5 ###### Heading Level 6
Rendered Result
Text Style
Markdown Source
**Bold Text** *Italic Text* ~~Strikethrough Text~~ **_Bold and Italic_** ==Highlighted Text== ^Superscript^ ~Subscript~
Rendered Result
Blockquotes
Markdown Source
> This is a blockquote. > > > This is a nested blockquote. > > It can have multiple levels. > > Back to the first level.
Rendered Result
Lists
Markdown Source
**Unordered List**: - Item 1 - Item 2 - Sub-item A - Sub-item B **Ordered List**: 1. First Step 2. Second Step 3. Third Step **Task List**: - [x] Completed Task - [ ] Pending Task A - [ ] Pending Task B
Rendered Result
Horizontal Rule
Markdown Source
First section --- Second section *** Third section ___ *Note: keep a blank line above and below the rule, otherwise it may be parsed as a setext heading.*
Rendered Result
Footnotes
Markdown Source
Markdown supports footnotes[^1] for supplementary notes. [^1]: Here is the footnote text, rendered at the end of the document.
Rendered Result
Escaping
Markdown Source
\*This is not italic\* \# This is not a heading \[This is not a link\] *Use a backslash \ to escape special Markdown characters.*
Rendered Result
#Code & Tables
Code
Markdown Source
This is `inline code`.
Here is a code block:
```javascript
function greet(name) {
console.log(`Hello, ${name}!`);
}
greet('World');
```
```python
def factorial(n):
if n == 0:
return 1
return n * factorial(n-1)
```Rendered Result
Tables
Markdown Source
| Name | Age | Occupation | | :--- | :--: | ---: | | Alice | 25 | Engineer | | Bob | 30 | Designer | | Charlie | 28 | Product Manager | *Note: Colons control column alignment (Left, Center, Right).*
Rendered Result
#Links & Media
Links & Images
Markdown Source
[Visit Google](https://www.google.com) Link with tooltip: [Markdown Guide](https://www.markdownguide.org "Learn Markdown") Image Example: 
Rendered Result
#Math Formulas (LaTeX)
Inline & Block Formulas
Markdown Source
Inline formula: Mass-energy equivalence $E = mc^2$.
Block formula (Quadratic Formula):
$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$
Complex example:
$$
f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2\pi i \xi x} \,d\xi
$$Rendered Result
#Diagrams (Mermaid)
Flowchart
Markdown Source
```mermaid
graph TD
A[Start] --> B{Is it?}
B -- Yes --> C[Login]
B -- No --> D[Register]
D --> C
C --> E[Dashboard]
E --> F[End]
```Rendered Result
Sequence Diagram
Markdown Source
```mermaid
sequenceDiagram
participant User
participant System
participant Database
User->>System: Request
System->>Database: Query
Database-->>System: Return Data
System-->>User: Show Result
```Rendered Result
Gantt Chart
Markdown Source
gantt
title Project Plan
dateFormat YYYY-MM-DD
section Design
Requirements :a1, 2023-01-01, 7d
UI Design :after a1, 5d
section Development
Frontend :2023-01-13, 10d
Backend :2023-01-13, 12d
section Testing
QA :2023-01-25, 5dRendered Result