Markdown Reference

Published Updated 6 min read

Comprehensive reference for markdown syntax: CommonMark (baseline), GitHub Flavored Markdown (GFM), and Obsidian callouts. Each example shows the markdown syntax and rendered result.


Part 1: Standard Markdown

1. Headings

MarkdownRendered Output
# Heading 1

Heading 1

## Heading 2

Heading 2

### Heading 3

Heading 3

#### Heading 4

Heading 4

##### Heading 5
Heading 5
###### Heading 6
Heading 6

2. Emphasis

MarkdownRendered Output
*italic* or _italic_italic
**bold** or __bold__bold
***bold italic***bold italic

3. Paragraphs

Paragraph Break

markdown
Line 1

Line 2

Preview:

Line 1

Line 2

Line Break

Add two spaces at the end of a line, or use a backslash \:

markdown
Line 1␣␣
Line 2

Or:

markdown
Line 1\
Line 2

Preview:

Line 1
Line 2

4. Unordered Lists

Use -, *, or + (all produce identical output):

markdown
- Item 1
- Item 2
  - Nested item (use 2-4 spaces or tab indentation)

Preview:

5. Ordered Lists

Sequential Numbering

markdown
1. Item 1
2. Item 2

Preview:

  1. Item 1
  2. Item 2

Non-Sequential Numbering

markdown
1. Item 1
1. Item 2

Preview:

  1. Item 1
  2. Item 2

Numbers can be in any order; the result is sequential.

markdown
[Link](https://example.com)

Preview:

Link

markdown
[Link](https://example.com 'Title')

Preview:

Link

markdown
[ref][1]

[1]: https://example.com

Preview:

ref

7. Images

Basic Image

markdown
![Alt text](image.jpg)

Preview:

Alt text

Image with Title

markdown
![Alt](img.jpg 'Title')

Preview:

Alt

Linked Image

markdown
[![Alt][img]][link]

[img]: image.jpg
[link]: https://example.com

Preview:

Alt

8. Blockquotes

Simple Quote

markdown
> Quote

Preview:

Quote

Multi-Paragraph Quote

markdown
> Quote line 1
>
> Quote line 2

Preview:

Quote line 1

Quote line 2

Nested Quote

markdown
> Outer
>
> > Nested

Preview:

Outer

Nested

9. Code

Inline Code

markdown
`code`

Preview:

code

10. Horizontal Rules

Use -, *, _, or <hr/> (all produce identical output):

markdown
---
***
___
<hr/>

Preview:


11. Escaping Characters

CharacterCodeResult
Hash\##
Asterisk\**
Underscore\__
Backtick\``
Backslash\\\
Plus\++
Dash\--
Bracket\[[

12. HTML Entities

CommonMark allows inline HTML, including HTML entities. While all HTML is supported by the spec, some platforms may have an allowlist of permitted tags and attributes.

EntityCodeResult
Copyright&copy;©
Trademark&trade;
Registered&reg;®
En-dash&ndash;
Em-dash&mdash;
Non-breaking space&nbsp;(space)
Less than&lt;<
Greater than&gt;>
Ampersand&amp;&

For a comprehensive list of HTML entities and URL encoding, see the HTML & URL Encoding Reference.

13. Subscript and Superscript

Markdown doesn’t have native syntax for subscript and superscript, but you can use HTML tags:

markdown
H<sub>2</sub>O
x<sup>2</sup> + y<sup>2</sup> = z<sup>2</sup>

Preview:

H2O

x2 + y2 = z2


Part 2: GitHub Flavored Markdown (GFM)

14. Tables

Basic Table

markdown
| Header 1 | Header 2 |
| -------- | -------- |
| Cell 1   | Cell 2   |

Preview:

Header 1Header 2
Cell 1Cell 2

Aligned Columns

markdown
| Left | Center | Right |
| :--- | :----: | ----: |
| A    |   B    |     C |

Preview:

LeftCenterRight
ABC

15. Task Lists

markdown
- [ ] Unchecked task
- [x] Checked task

Preview:

16. Strikethrough

MarkdownRendered Output
~~text~~text

17. Mentions and References

MarkdownRendered Output
@usernameMentions a user (on GitHub)
#123References an issue/PR
org/repo#456References across repos
MarkdownRendered Output
https://example.comhttps://example.com
user@example.comuser@example.com

19. Fenced Code Blocks

markdown
```javascript
const x = 5;
```

Preview:

javascript
const x = 5;
Tip

You can nest code blocks by using more backticks.

markdown
````markdown
```javascript
const y = 10;
```
````

20. Footnotes

markdown
Here's a sentence with a footnote.[^1]

Another reference.[^note]

[^1]: This is the first footnote.

[^note]: Named footnotes are easier to manage in long documents.

Preview:

Here’s a sentence with a footnote.1

Another reference.2

21. Emoji

Use :emoji_name: syntax for Slack-like emoji shortcodes:

markdown
:smile: :rocket: :+1: :tada:

Preview:

😄 🚀 👍 🎉

Tip

For a complete list of emoji shortcodes, see the Emoji Cheat Sheet.

Part 3: Obsidian Callouts

All callout types follow the syntax: > [!TYPE] Optional Title

Case Sensitivity

Obsidian officially uses lowercase callout types (e.g., > [!note]), but many implementations are case-insensitive and accept uppercase (e.g., > [!NOTE]). The examples in this guide use uppercase for consistency, but lowercase is the official Obsidian syntax.

Callout Types Reference

TypeAliasesPurpose
noteGeneral information
abstractsummary, tldrSummaries
infoInformation
todoAction items
tiphint, importantHelpful hints
successcheck, doneSuccess messages
questionhelp, faqQuestions
warningcaution, attentionPotential issues
failurefail, missingFailures
dangererrorSerious warnings
bugBug reports
exampleDemonstrations
quoteciteQuotations

Customizing Callouts

Custom Titles

By default, callouts display their type name as the title (e.g., “Note”, “Warning”, “Tip”). You can override this by adding a custom title after the callout type:

markdown
> [!NOTE] Custom Title Here
> This callout will display "Custom Title Here" instead of "Note".

Preview:

Custom Title Here

This callout will display “Custom Title Here” instead of “Note”.

Collapsible Callouts

You can make callouts collapsible by adding a + or - immediately after the type identifier:

markdown
> [!NOTE]+ Expanded by Default
> This callout is collapsible and starts expanded.

> [!NOTE]- Collapsed by Default
> This callout is collapsible and starts collapsed.

> [!NOTE] Not Collapsible
> This callout cannot be collapsed.

Preview:

Expanded by Default

This callout is collapsible and starts expanded.

Collapsed by Default

This callout is collapsible and starts collapsed.

Not Collapsible

This callout cannot be collapsed.

Callout Preview

Note

This is a note callout. Use it for general information and additional context.

Abstract

This is an abstract callout (aliases: summary, tldr). Use it for summaries and overviews.

Info

This is an info callout. Use it for informational content and notices.

Todo

This is a todo callout. Use it for action items and tasks.

Tip

This is a tip callout (aliases: hint, important). Use it for helpful hints and best practices.

Success

This is a success callout (aliases: check, done). Use it for success messages and completed actions.

Question

This is a question callout (aliases: help, faq). Use it for questions and frequently asked questions.

Warning

This is a warning callout (aliases: caution, attention). Use it to alert users about potential issues.

Failure

This is a failure callout (aliases: fail, missing). Use it to indicate errors and failures.

Danger

This is a danger callout (alias: error). Use it for serious warnings and dangerous operations.

Bug

This is a bug callout. Use it for bug reports and known issues.

Example

This is an example callout. Use it for demonstrations and code examples.

Quote

This is a quote callout (alias: cite). Use it for quotations and cited text.

Advanced Combinations

Callouts with Lists

markdown
> [!NOTE]
> Remember these key points:
>
> - Point one
> - Point two
> - Point three

> [!DANGER]
> Before you continue:
>
> 1. Back up your data
> 2. Close all other applications
> 3. Ensure sufficient disk space

Preview:

Note

Remember these key points:

  • Point one
  • Point two
  • Point three
Danger

Before you continue:

  1. Back up your data
  2. Close all other applications
  3. Ensure sufficient disk space

Callouts with Code

markdown
> [!EXAMPLE]
> Here's how to use the API:
>
> \`\`\`javascript
> const result = await api.fetch('/users');
> console.log(result);
> \`\`\`

Preview:

Example

Here’s how to use the API:

javascript
const result = await api.fetch('/users');
console.log(result);

Callouts with Emphasis

markdown
> [!IMPORTANT]
> This is **very important** and _cannot be ignored_.
>
> **_Seriously_**, read this carefully!

Preview:

Important

This is very important and cannot be ignored.

Seriously, read this carefully!


Compatibility


Resources

Footnotes

  1. This is the first footnote.

  2. Named footnotes are easier to manage in long documents.