Skip to content

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 ​

  1. First item
  2. Second item
  3. 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 1Header 2Header 3
Cell 1Cell 2Cell 3
Cell 4Cell 5Cell 6

VitePress Official Site

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.