Markdown Commands Complete Guide - All Markdown Syntax Commands Reference
Markdown "commands" are really just markup symbols — specific character combinations that tell a renderer how to display your text. Unlike HTML, Markdown was designed so that even in plain text form, you can immediately see the content structure.
This article brings together every commonly used Markdown command (also called syntax commands or formatting markers), each with a syntax example, rendering explanation, and platform compatibility note. There's also a quick-reference cheat sheet at the bottom.
Text Formatting Commands
Bold
Wrap text with two asterisks or two underscores:
**This text will be bold**
__This will also be bold__Result: This text will be bold
I'd recommend sticking with asterisks. Underscores inside a word won't trigger bold formatting (e.g., a__b__c stays as-is), while asterisks don't have this limitation. This difference is explicitly defined in the CommonMark spec.
Italic
One asterisk or one underscore:
*Italic text*
_Also italic_Result: Italic text
Same advice — use asterisks. Underscores within words are treated as literal characters by many parsers.
Bold + Italic
Three asterisks or three underscores:
***Bold and italic***
___Same here___Result: Bold and italic
Strikethrough
Two tildes:
~~Struck-through text~~Result: Struck-through text
This is a GFM (GitHub Flavored Markdown) extension, not part of the original Markdown spec. That said, most modern editors and platforms support it now — Typora, VS Code preview, GitLab, Obsidian, and others.
Heading Commands
Use # for heading levels — 1 to 6 # symbols correspond to H1 through H6:
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6A few things to keep in mind:
- You must put a space after
#, or many parsers won't recognize it as a heading - Stick to one H1 per document, typically used as the title
- H4 and below look very similar to body text in most renderers — H2 and H3 are what you'll use most
There's also the older Setext-style headings (using = and - underlines), which only support two levels:
Heading 1
=========
Heading 2
---------You'll still see this in some older documents, but new projects almost exclusively use #.
List Commands
Unordered Lists
Start lines with -, *, or + (your choice, same result):
- First item
- Second item
- Nested sub-item (indent with 2 or 4 spaces)
- Third item- First item
- Second item
- Nested sub-item
- Third item
Honestly, I just use - everywhere. Mixing markers works fine but looks messy in the source.
Ordered Lists
Numbers followed by periods:
1. Open your editor
2. Write Markdown
3. Save the fileHere's a feature many people don't know about: the actual numbers in ordered lists don't affect the rendered output. You can write all 1.s:
1. Open your editor
1. Write Markdown
1. Save the fileIt still renders as 1, 2, 3. This is a thoughtful design choice — when you insert or remove items, you don't need to renumber everything. I've been using this trick in long documents for years, and it saves a lot of maintenance headaches.
Task Lists
Square brackets with a space or x:
- [x] Completed task
- [ ] Incomplete task
- [ ] Another to-do item- [x] Completed task
- [ ] Incomplete task
This is a GFM extension, especially popular in GitHub issues and PRs. Obsidian and Typora support it too.
Link and Image Commands
Inline Links
[Link text](https://example.com)
[Link with title](https://example.com "Hover tooltip")Reference-style Links
Great for when the same link appears multiple times or URLs are long:
I search with [Google][1] and frequently use [Google][1] for research.
[1]: https://google.com "Google Search"Reference-style links render identically to inline links, but the source is much more readable. If you write technical documentation — especially with repeated links — reference-style links are way easier to maintain. You only need to update the URL in one place.
Autolinks
Wrap URLs or emails in angle brackets:
<https://example.com>
<user@example.com>Email addresses get auto-encoded, which provides some protection against spam bots.
Images

The syntax is the same as links but with a ! prefix. Standard Markdown doesn't support image resizing — you'll need HTML for that:
<img src="image.png" alt="Description" width="300">Code Commands
Inline Code
Single backticks:
Use `console.log()` to print output.Result: Use console.log() to print output.
Code Blocks
Wrap with triple backticks. Add a language identifier for syntax highlighting:
```python
def hello():
print("Hello, Markdown!")
Which languages are supported for highlighting depends on your platform. GitHub uses the Linguist library supporting hundreds of languages, while Typora uses highlight.js — both cover a wide range.
### Displaying Backticks Inside Code Blocks
When the code itself contains triple backticks, use four backticks for the outer fence:
````markdown
````markdown
```javascript
console.log("Nested code block");
Blockquote Commands
Right angle brackets:
> This is a blockquote.
> It can span multiple lines.
>
> Blank line for a new paragraph.
> Nested quotes
>> Level 2
>>> Level 3This is a blockquote. It can span multiple lines.
You can use other Markdown commands inside blockquotes (bold, links, lists, etc.) without restrictions.
Table Commands
Built with pipes and hyphens:
| Command | Syntax | Description |
|---------|--------|-------------|
| Bold | `**text**` | Two asterisks |
| Italic | `*text*` | One asterisk |
| Link | `[text](url)` | Brackets + parens |Alignment is controlled with colons:
| Left | Center | Right |
|:-----|:------:|------:|
| Cell | Cell | Cell |:---left-aligned (default):---:centered---:right-aligned
Tables are a GFM extension. Inside tables, pipe characters need to be escaped with \|. Also, you can't use block-level elements (headings, lists, code blocks) inside table cells — a detail that's often overlooked and leads to unexpected rendering.
Horizontal Rule Command
Three or more -, *, or _:
---
***
___All three render identically. I'd recommend --- — asterisks and underscores can be ambiguous in certain contexts (though blank lines above and below prevent issues).
Escape Command
A backslash \ escapes these 12 special characters:
\* \# \| \[ \] \(\) \{ \} \` \. \! \_
\*This won't be italic\*
\# This won't be a headingA pitfall I've hit: forgetting to escape | inside a table. The table structure breaks immediately. After that happened a few times, I made it a habit to always escape special characters inside tables.
Footnote Commands
Here's a footnote reference[^1], and another one[^note].
[^1]: This is the first footnote's content.
[^note]: Named footnotes work too.Where footnotes render depends on the renderer (usually at the bottom of the page). This feature works well in Obsidian, Typora, and Pandoc, but GitHub's wiki pages don't support it.
Inline HTML
When Markdown commands aren't enough, you can write HTML directly:
<mark>Highlighted text</mark>
<kbd>Ctrl</kbd> + <kbd>C</kbd>
<sub>Subscript</sub>
<sup>Superscript</sup>
<br>The rule is: Markdown syntax inside block-level HTML tags (<div>, <p>, etc.) is not processed; Markdown inside inline HTML tags (<span>, <strong>, etc.) works normally. This rule comes from the original Markdown spec's design and is worth understanding.
Markdown Commands Cheat Sheet
This table covers the most commonly used Markdown syntax commands — use it as your daily reference card.
| Command | Syntax | Type |
|---|---|---|
| Bold | **text** | Standard |
| Italic | *text* | Standard |
| Bold + Italic | ***text*** | Standard |
| Strikethrough | ~~text~~ | GFM |
| Heading 1 | # heading | Standard |
| Heading 2 | ## heading | Standard |
| Heading 3 | ### heading | Standard |
| Unordered list | - item | Standard |
| Ordered list | 1. item | Standard |
| Task list | - [x] item | GFM |
| Inline link | [text](url) | Standard |
| Reference link | [text][id] | Standard |
| Autolink | <url> | Standard |
| Image |  | Standard |
| Inline code | `code` | Standard |
| Code block | ```lang | GFM |
| Blockquote | > text | Standard |
| Table | pipes + hyphens | GFM |
| Horizontal rule | --- | Standard |
| Escape | \char | Standard |
| Footnote | [^1] | Extension |
Markdown Command Differences Across Platforms
The same Markdown command can behave differently depending on the platform. Here's a comparison of the platforms I use most:
| Command | GitHub | GitLab | Typora | Obsidian |
|---|---|---|---|---|
| Strikethrough | ✅ | ✅ | ✅ | ✅ |
| Task lists | ✅ | ✅ | ✅ | ✅ |
| Tables | ✅ | ✅ | ✅ | ✅ |
| Footnotes | Partial | ✅ | ✅ | ✅ |
| Math formulas | ✅ | ✅ | ✅ | ✅ |
| Mermaid diagrams | ✅ | ✅ | ✅ | ✅ |
| Emoji shortcodes | ✅ :smile: | ✅ | ✅ | ❌ |
| @mentions | ✅ | ✅ | ❌ | ❌ |
| Auto TOC | ❌ | ❌ | ✅ [toc] | ❌ |
In practice, GitHub's footnote support is limited — its wiki pages don't support them, though regular issues, PRs, and .md files do. If your documents need to work across multiple platforms, I'd suggest prioritizing standard Markdown commands and only using extended syntax when you've confirmed all target platforms support it.
References
- CommonMark Spec — https://spec.commonmark.org/
- Daring Fireball: Markdown Syntax — https://daringfireball.net/projects/markdown/syntax
- GitHub Docs: Basic Writing and Formatting Syntax — https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
- Markdown Guide: Basic Syntax — https://www.markdownguide.org/basic-syntax/
- Markdown — Wikipedia — https://en.wikipedia.org/wiki/Markdown