Skip to main content

Asciidoc Syntax Overview

·1 min

Basic Text Formatting

  • Bold: bold text or bold text

  • Italic: italic text or italic text

  • Monospace: monospace text

  • Superscript: superscript

  • Subscript: subscript

Headings

Document Title (Level 0)

Level 1 Section

Level 2 Section

Level 3 Section

Level 4 Section

Lists

Unordered Lists

  • Item 1

  • Item 2

    • Nested item

  • Item 3

Ordered Lists

  1. First item

  2. Second item

    1. Nested item

  3. Third item

  • Link: Link Text

  • Image: image::path/to/image.png[Alt Text]

  • Block image: image::path/to/image.png[Alt Text, width=300]

Code Blocks

def hello():
    print("Hello, World!")

Tables

Header 1Header 2Header 3

Cell 1

Cell 2

Cell 3

Cell 4

Cell 5

Cell 6

Admonitions

Note
This is a note.
Tip
This is a tip.
Important
This is important.
Warning
This is a warning.
Caution
Use caution here.

Block Quotes

This is a block quote.

— Author Name

Callouts in Code Blocks

def fetch_data():  # <b class="conum">(1)</b>
    return requests.get('/api/data')  # <b class="conum">(2)</b>
  1. Fetches data from the API.

  2. Returns the response object.