Markdown Syntax Guide

Welcome to this comprehensive guide on Markdown syntax, with examples of every standard markdown element and some custom components for VitePress or other markdown-based documentation platforms.


Headings

H1 Heading

H2 Heading

H3 Heading

H4 Heading

H5 Heading
H6 Heading

Text Styles

  • Bold text
  • Italic text
  • Strikethrough text
  • Bold and Italic text

Blockquotes

This is a blockquote.

Nested blockquote.


Lists

Unordered List

  • Item 1
  • Item 2
    • Sub-item 2.1
    • Sub-item 2.2
  • Item 3

Ordered List

  1. First item
  2. Second item
    1. Sub-item 2.1
    2. Sub-item 2.2
  3. Third item

Code

Inline Code

Use console.log("Hello World") to log messages.

Code Block

<template>
    <div class="antialiased">
        <div
            class="h-14 px-8 flex items-center border-b border-gray-200 sticky top-0 bg-white"
        >
            <div class="flex items-center">
                <NuxtLink
                    v-for="link in links"
                    :key="link.url"
                    :to="link.url"
                    class="text-[13px] text-gray-600 font-medium px-3 p-1"
                >
                    {{ link.name }}
                </NuxtLink>
            </div>
        </div>

        <div class="mt-14 mx-auto max-w-7xl px-8">
            <div class="text-sm">
                <ContentDoc />
            </div>
        </div>
    </div>
</template>
<script lang="ts" setup>
const links = [
    {
        name: "Home",
        url: "/",
    },
    {
        name: "Docs",
        url: "/docs",
    },
    {
        name: "Components",
        url: "/components",
    },
];
</script>

Tables

NameAgeOccupation
John Doe30Software Dev
Jane Smith25Data Scientist
Sam Wilson35Designer

Images

Alt text for image


OpenAI


Horizontal Rule



Custom Badge

Use badges for displaying tags or status: <Badge text="New" color="green" />


Task Lists

  • Task 1
  • Task 2
  • Task 3

Footnotes

Here's some text with a footnote. 1


Definition List

Term : Definition of the term

Another Term : Another definition


This file covers essential Markdown syntax, lists, tables, code blocks, custom components, and custom containers often used in VitePress or markdown-based documentation setups.

Footnotes

  1. This is the footnote.