Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Markdown Basics

Markdown Basics

Markdown is the underlying writing language of Obsidian.

Markdown uses plain-text symbols to express formatting, letting you keep your hands on the keyboard while writing and focus on content rather than layout.

This chapter covers the most commonly used Markdown syntax in daily Obsidian use; all examples can be practiced directly in Obsidian.

For more on Markdown:https://www.runoob.com/markdown/md-tutorial.html


Title

Markdown uses the # symbol for headings, with counts from 1 to 6 corresponding to H1 through H6.

In Obsidian, headings have two extra roles: the Outline panel automatically generates a document table of contents based on headings, and other notes can link directly to a heading position via [[note-name#heading]].

Example

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

It is recommended to start body text from Heading 2, reserving Heading 1 for the note's main title. This makes the outline structure clearer and facilitates locating content via heading references later.


Text formatting

Basic inline styles wrap text with the following symbols.

Example

**

This is bold

**

This is also bold

This is italic

This is also italic


This is bold italic


~~This is strikethrough~~

==This is highlighted==

Rendered effect:

Among these, ==highlight== is Obsidian's extension to standard Markdown and may not work in ordinary Markdown editors.


reference

Use the > symbol to create a blockquote, suitable for quoting external material or highlighting important content.

Example

This is a quote

This is another quote

Can span multiple lines

Headings can be nested in quotes

Any Markdown syntax can be used inside a blockquote:

**

Bold text

**

In Obsidian, blockquotes have a special use: adding a marker like [!note] before the quote turns it into a Callout box.

Example

[

!

note

]

Tip

This is a Callout box, more eye-catching than a normal quote.

[

!

warning

]

Note

Deleting a file in the Vault also deletes the local file; please confirm before doing so.

[

!

tip

]

Tip

Press Cmd+P to open the command palette, where you can search for and execute all of Obsidian's operations.


Lists and task lists

Unordered list

Use -, *, or + to create an unordered list.

Sublists use indentation (Tab or two spaces) to indicate hierarchy.

Example

    - Python

    - JavaScript

    - Go

    - Relational

        - MySQL

        - PostgreSQL

    - Non-relational

        - MongoDB

        - Redis

Ordered list

Use a number followed by . to create an ordered list; the numbers need not be consecutive, as Markdown auto-increments.

Example

1

. Open Obsidian

2

. Create a new Vault

3

. Create a new note

4

. Start writing

Task list

Use - [ ] to create clickable checkboxes, one of the most frequently used syntaxes in Obsidian.

Example

Today's to-do

[

]

Finish reading Chapter 3 of "Computer Systems: A Programmer's Perspective"

[

]

Organize this week's study notes

[

x

]

Complete the Obsidian environment setup

[

x

]

Learn basic Markdown syntax

In Obsidian, clicking a checkbox toggles its completion status.

Combined with the Dataview plugin, you can also aggregate all unfinished tasks across notes - this advanced usage is introduced in later chapters.


Code and code blocks

Inline code

Wrap inline code or commands with a single backtick `.

Example

Run in the terminal

`

npm

install

`

Install dependencies.

The

`

print

(

)

`

The function is used to output content.

Code block

Wrap multi-line code with three backticks ``` and specify the language at the start for syntax highlighting.

Example



python



  

# File path: hello.py



  

def greet



(



name



)



:



  

   



""



"向指定用户打招呼"



""



  

   



return



f



"Hello, {name}!"



  

  

# Call function and print result



  

result = greet



(



"runoob"



)



  

print



(



result



)



  

Obsidian supports syntax highlighting for dozens of programming languages, including Python, JavaScript, C++, Java, Go, Rust, SQL, Bash, and more.


Tables

Use | to separate columns and --- to separate header from body.

Use : in the --- row to control alignment.

Example

|

Language

|

Year created

|

Creator

|

|


|

:--------:

|


|

|

Python

|

1991

|

Guido van Rossum

|

|

JavaScript

|

1995

|

Brendan Eich

|

|

Go

|

2009

|

Robert Griesemer, Rob Pike, Ken Thompson

|

|

Rust

|

2010

|

Graydon Hoare

|

Alignment rules:

Markdown tables do not support merged cells. If you need complex tables, consider using HTML's

tag; Obsidian supports embedding HTML directly in Markdown files.


Images and links

Hyperlinks

The basic syntax is display text.

Example

[

RUNOOB Tutorial

]

(

https:

//

www.runoob.com

)

[

GitHub

]

(

https:

//

github.com

"title text shown on hover"

)

Picture

The syntax is similar to links, with an ! added in front.

Obsidian supports pasting images directly; it automatically copies them to the attachments folder and inserts a reference in the current note.

Example

-- Network image --

!

[

RUNOOB Logo

]

(

https:

//

www.runoob.com

/

images

/

logo.png

)

-- Local image (relative to Vault root) --

!

[

Architecture diagram

]

(

attachments

/

architecture.png

)

-- With size control (Obsidian extension syntax) --

!

[

Architecture diagram

|

300

]

(

attachments

/

architecture.png

)

Obsidian extends the image syntax, allowing you to append |width after the filename to control display size, for example Image|400 limits the image width to 400 pixels.

Obsidian-specific: Internal links

Besides standard Markdown links, Obsidian provides the [[note-name]] syntax to link to other notes in the Vault.

This is Obsidian's most core syntax, detailed in the next chapter.


Horizontal rules

Use three or more ---, ***, or ___ to create a horizontal rule.

Example

Part one

Content...


Part two

Content...

Note the distinction:--- A single line is a horizontal rule, but at the very top of the document, --- the content between is YAML Front Matter (see next section). Obsidian automatically recognizes the context to decide whether it is a horizontal rule or Front Matter.


YAML Front Matter

Front Matter is a metadata block written at the very top of a note, wrapped in two sets of ---.

It is used to define the note's attributes: tags, aliases, creation date, status, etc.

Example


title

:

"Obsidian Study Notes"

tags

:

 - obsidian

  - markdown

  - Note tools

aliases

:

 - Obsidian Getting Started

  - Second Brain Tutorial

created

:

2026

-05-

21

status

:

In progress


Common Front Matter field descriptions:

Field Type Description
tags String or array The note's tags, supporting nesting such as programming/Python
aliases String or array The note's aliases; other notes can link to this one via an alias
created Date Creation date, auto-filled by the Templater plugin
updated Date Last updated date, auto-maintained by some plugins
status String Note status, such as "draft", "in progress", "completed"

Field names in Front Matter are case-sensitive. It is recommended that teams or projects unify naming conventions to avoid tags and Tags mixed usage causing Dataview queries to miss data.

The core value of Front Matter lies in using it with the Dataview plugin - you can, like querying a database, filter out all notes with tag "obsidian" and status "in progress".


Markdown syntax cheat sheet

Element Syntax Quick memory
Title # H1 ## H2 ### H3 Hash + space + text
Bold Text Two asterisks wrapping
italic Text Single asterisk wrapping
Strikethrough ~~text~~ Double tilde wrapping
Highlight ==text== Double equals wrapping (Obsidian extension)
Inline code code Single backtick wrapping
Code block ```language Three backticks + language name
reference > text Greater-than sign + space
Unordered list - item Minus + space
Task list - [ ] task Minus + space + square brackets
link Text Square brackets + parentheses
Picture Alternative text Exclamation mark + link syntax
Internal link [[note-name]] Double square brackets (Obsidian extension)
Tables | col1 | col2 | Pipe-separated
Horizontal rules --- Three hyphens on a single line