Markdown Examples
This page demonstrates some commonly used Markdown syntax in VitePress.
Headings
H1 Heading
H2 Heading
H3 Heading
Emphasis
Bold text
Italic text
Strikethrough
Lists
Unordered List
- Item 1
- Item 2
- Sub-item 2.1
- Sub-item 2.2
Ordered List
- First item
- Second item
- Third item
Code
Inline Code
Use const to declare constants.
Code Blocks
javascript
function hello() {
console.log('Hello, VitePress!')
}typescript
interface User {
name: string
age: number
}Quotes
This is a quote.
It can have multiple lines.
Tables
| Header 1 | Header 2 | Header 3 |
|---|---|---|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
Links
Custom Containers
INFO
This is an info box.
TIP
This is a tip box.
WARNING
This is a warning box.
DANGER
This is a danger box.