Skip to content

Markdown Syntax Examples ​

1. Headings ​

This is an H1 ​

This is an H2 ​

This is an H3 ​

This is an H4 ​

This is an H5 ​
This is an H6 ​

2. Text Formatting ​

Bold text
Italic text
Bold and italic text
Strikethrough text

Blockquote:
"This is a blockquote example."

3. Lists ​

Unordered List ​

  • Item 1
  • Item 2
    • Sub-item 1
    • Sub-item 2

Ordered List ​

  1. First item
  2. Second item
    1. Sub-item A
    2. Sub-item B

OpenAI

OpenAI Logo

5. Code Blocks ​

Inline Code ​

print("Hello, world!")

Code Block ​

python
def hello():
    print("Hello, world!")
hello()

6. Tables ​

NameAgeCity
John Doe25New York
Jane Smith30London

7. Task Lists ​

  • [x] Task 1 completed
  • [ ] Task 2 pending
  • [ ] Task 3 in progress

8. Horizontal Rule ​


or


9. Escaping Characters ​

Use a backslash to escape special characters:
# Escaped H1
*Escaped asterisk*

10. Emojis 😄 ​

Markdown supports emojis: 🚀 ⭐

11. Footnotes ​

Here is a sentence with a footnote.[^1]

[^1]: This is the footnote.

12. HTML in Markdown ​

This text is red using HTML.


This example demonstrates the basic elements of Markdown syntax, covering headers, text formatting, links, images, code blocks, lists, tables, task lists, horizontal rules, escaped characters, emojis, footnotes, and even HTML integration. You can use this template as a quick reference for Markdown formatting.

See more on Vitepress