Markdown Cheat Sheet with Examples

A complete Markdown syntax reference with copy-paste examples for every element. Use the quick table below, or explore each element interactively.

Markdown Syntax Quick Reference

ElementMarkdown SyntaxResult
Heading 1# Heading 1Largest heading
Heading 2## Heading 2Section heading
Bold**bold text**bold text
Italic*italic text*italic text
Bold + Italic***bold italic***bold italic
Strikethrough~~struck through~~struck through
Inline code`code`code
Link[title](https://example.com)title (clickable)
Image![alt text](image.jpg)embedded image
Unordered list- Item 1 - Item 2bulleted list
Ordered list1. First 2. Secondnumbered list
Task list- [x] Done - [ ] Todocheckbox list
Blockquote> quoted textindented quote
Code block```js code ```fenced code block
Table| A | B | | - | - | | 1 | 2 |data table
Horizontal rule---divider line
Looking for platform-specific syntax?

Headings

Headings

Create headings using # symbols. The number of # symbols determines the heading level (1-6).

github gitlab obsidian discord slack notion
Markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Output
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Tips
  • Always put a space after the # symbols
  • Use heading levels hierarchically
Common Mistakes
  • Skipping heading levels (e.g., going from H1 to H3)

Alternative Headings

Alternative syntax for H1 and H2 using underlines.

github gitlab obsidian discord slack notion
Markdown
Heading 1
=========

Heading 2
---------
Output
Heading 1
Heading 2

Emphasis

Make text bold using double asterisks or underscores.

github gitlab obsidian discord slack notion
Markdown
**bold text**
__also bold__
Output

bold text
also bold

Tips
  • Asterisks are more commonly used and work in more contexts

Italic

Make text italic using single asterisks or underscores.

github gitlab obsidian discord slack notion
Markdown
*italic text*
_also italic_
Output

italic text
also italic

Bold & Italic

Combine bold and italic using triple asterisks or underscores.

github gitlab obsidian discord slack notion
Markdown
***bold and italic***
___also bold and italic___
Output

bold and italic
also bold and italic

Strikethrough

Strike through text using double tildes.

github gitlab obsidian discord slack notion
Markdown
~~strikethrough text~~
Output

strikethrough text

Highlight

Highlight text using double equals signs. Note: Not standard Markdown.

github gitlab obsidian discord slack notion
Markdown
==highlighted text==
Output

==highlighted text==

Tips
  • This is an extended syntax, not supported everywhere

Lists

Unordered List

Create bullet lists using dashes, asterisks, or plus signs.

github gitlab obsidian discord slack notion
Markdown
- Item 1
- Item 2
  - Nested item
  - Another nested
- Item 3
Output
  • Item 1
  • Item 2
    • Nested item
    • Another nested
  • Item 3
Tips
  • Use 2 spaces for nesting
  • Be consistent with your list marker

Ordered List

Create numbered lists using numbers followed by periods.

github gitlab obsidian discord slack notion
Markdown
1. First item
2. Second item
3. Third item
   1. Nested item
   2. Another nested
Output
  1. First item
  2. Second item
  3. Third item
    1. Nested item
    2. Another nested
Tips
  • Numbers don't need to be in order - Markdown will auto-number

Images

Embed an image with alt text.

github gitlab obsidian discord slack notion
Markdown
![Alt text](/icon.svg)
Output

Alt text

Tips
  • Always include descriptive alt text for accessibility

Image with Title

Add a tooltip title to an image.

github gitlab obsidian discord slack notion
Markdown
![Alt text](/icon.svg "Image title")
Output

Alt text

Linked Image

Make an image clickable by wrapping it in a link.

github gitlab obsidian discord slack notion
Markdown
[![Alt text](/icon.svg)](https://example.com)
Output

Alt text

Code

Inline Code

Format code inline using backticks.

github gitlab obsidian discord slack notion
Markdown
Use `code` inline
Output

Use code inline

Code Block

Create a code block with syntax highlighting.

github gitlab obsidian discord slack notion
Markdown
```javascript
const greeting = "Hello, World!";
console.log(greeting);
```
Output
const greeting = "Hello, World!";
console.log(greeting);
Tips
  • Specify the language after the opening backticks for syntax highlighting

Indented Code Block

Create a code block using 4 spaces indentation.

github gitlab obsidian discord slack notion
Markdown
    const greeting = "Hello";
    console.log(greeting);
Output
const greeting = "Hello";
console.log(greeting);

Tables

Create tables using pipes and dashes.

github gitlab obsidian discord slack notion
Markdown
| Header 1 | Header 2 | Header 3 |
|----------|----------|----------|
| Cell 1   | Cell 2   | Cell 3   |
| Cell 4   | Cell 5   | Cell 6   |
Output
Header 1 Header 2 Header 3
Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6
Tips
  • Columns don't need to be perfectly aligned
  • Use colons for alignment

Table Alignment

Align table columns using colons.

github gitlab obsidian discord slack notion
Markdown
| Left | Center | Right |
|:-----|:------:|------:|
| L    | C      | R     |
Output
Left Center Right
L C R

Blockquotes

Blockquote

Create a blockquote using the > character.

github gitlab obsidian discord slack notion
Markdown
> This is a blockquote.
> It can span multiple lines.
Output

This is a blockquote.
It can span multiple lines.

Nested Blockquote

Nest blockquotes using multiple > characters.

github gitlab obsidian discord slack notion
Markdown
> Outer quote
>> Nested quote
>>> Even more nested
Output

Outer quote

Nested quote

Even more nested

Horizontal Rules

Horizontal Rule

Create a horizontal line using three or more dashes, asterisks, or underscores.

github gitlab obsidian discord slack notion
Markdown
---

***

___
Output



Task Lists

Task List

Create interactive checklists using brackets.

github gitlab obsidian discord slack notion
Markdown
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task
Output
  • Completed task
  • Incomplete task
  • Another task

Footnotes

Footnote

Add footnotes to your document.

github gitlab obsidian discord slack notion
Markdown
Here's a sentence with a footnote.[^1]

[^1]: This is the footnote content.
Output

Here's a sentence with a footnote.1


  1. This is the footnote content.

Other

Line Break

Create a line break by ending a line with two spaces.

github gitlab obsidian discord slack notion
Markdown
First line
Second line
Output

First line
Second line

Tips
  • Two spaces at the end of a line creates a <br>

Escaping Characters

Escape special characters using backslash.

github gitlab obsidian discord slack notion
Markdown
\*Not italic\*
\# Not a heading
Output

*Not italic*
# Not a heading

Insert emojis using shortcodes.

github gitlab obsidian discord slack notion
Markdown
:smile: :heart: :thumbsup:
Output

:smile: :heart: :thumbsup:

Tips
  • GitHub supports a wide range of emoji shortcodes

Comment

Hide notes in your source using HTML comments. The text is invisible in the rendered output.

github gitlab obsidian discord slack notion
Markdown
<!-- This comment will not appear in the rendered output -->
Output
Tips
  • Comments can span multiple lines - everything between <!-- and --> is hidden
Common Mistakes
  • Putting sensitive information in comments - anyone reading the raw source can still see them

Syntax Deep Dives

Want more than a quick reference? Each guide covers edge cases, common mistakes, and platform differences for one element.

Markdown Flavors Compared: What Works Where

Core Markdown is the same everywhere, but every platform adds and removes features. This verified matrix covers 21 features across 8 platforms — every cell checked against the official documentation on 2026-07-18. Click a platform name for its full cheat sheet.

Markdown syntax feature compatibility across CommonMark, GitHub, GitLab, Obsidian, Discord, Slack, Reddit, and Jupyter / R Markdown
FeatureCommonMarkGitHubGitLabObsidianDiscordSlackRedditJupyter / Rmd
Headings
# Heading 1Source ↗
yes
ATX (#) and Setext styles; levels 1–6.
yes
Levels 1–6 with auto-generated anchors.
yes
Levels 1–6, Setext alternative; auto anchors.
yes
Levels 1–6; appear in the outline pane.
partial
H1–H3 (# to ###) plus -# subtext only.
no
Not in message formatting; canvases only.
yes
Six levels; Setext underline style also works.
yes
Supported in Jupyter cells and R Markdown.
Bold
**bold text**Source ↗
yes
** or __ delimiters.
yes
** or __.
yes
** or __.
yes
** or __.
yes
**text** only; __ is underline here.
yes
*text* markup or the toolbar button.
yes
** or __.
yes
** or __ in both.
Italic
*italic text*Source ↗
yes
* or _ delimiters.
yes
* or _.
yes
* or _; intra-word underscores ignored.
yes
* or _.
yes
*text* or _text_.
yes
_text_ markup or the toolbar button.
yes
* or _.
yes
* or _ in both.
Strikethrough
~~struck text~~Source ↗
no
Not in the spec.
yes
GFM extension; GitHub also accepts a single ~.
yes
GLFM: ~~double tildes~~.
yes
GFM-style ~~text~~.
yes
~~text~~.
yes
~text~ (single tilde) or the toolbar.
yes
~~double tildes~~.
partial
R Markdown (Pandoc strikeout): yes; not documented for Jupyter cells.
Underline
<u>text</u> (HTML)Source ↗
no
No syntax; raw <u>/<ins> HTML is the only option.
partial
No Markdown syntax; GitHub documents the <ins> tag.
no
No documented underline syntax.
partial
<u> HTML works; no Markdown syntax, and Markdown inside HTML is not processed.
yes
__text__ (Discord extension).
partial
Toolbar only; no markup shortcut.
no
Not supported.
partial
No Markdown syntax; raw <u> passes through to HTML output.
Tables
| A | B | | --- | --- |Source ↗
no
Not in the spec.
yes
GFM tables extension with column alignment.
yes
GLFM tables; paste from spreadsheets works.
yes
Plus Live Preview table editing.
no
No table syntax.
no
No tables in messages.
yes
Pipe tables; parsing quirks differ between old and new Reddit.
yes
Jupyter renders GFM tables; R Markdown supports pipe tables.
Task lists
- [x] done - [ ] todoSource ↗
no
Not in the spec.
yes
GFM task list extension.
yes
Adds an inapplicable [~] state.
yes
Any character inside the brackets marks a task complete.
no
Renders as a plain list item.
no
No Markdown syntax for tasks.
no
Renders as a plain list item.
partial
R Markdown (Pandoc task_lists): yes; not documented for Jupyter cells.
Footnotes
Text.[^1] [^1]: The note.Source ↗
no
Not in the spec.
yes
GitHub.com extension; not part of the GFM spec itself.
yes
GLFM footnotes.
yes
Plus inline ^[...] footnotes.
no
Renders as literal [^1].
no
Not supported.
no
Renders as literal [^1].
partial
R Markdown (Pandoc footnotes): yes; Jupyter cells do not render them.
Math (LaTeX)
$x^2$Source ↗
no
Not in the spec.
yes
MathJax on github.com; $ inline and $$ blocks.
yes
KaTeX; $`...`$ inline and ```math blocks.
yes
MathJax; $ inline and $$ blocks.
no
Not supported.
no
Not supported.
no
No native rendering.
yes
MathJax in Jupyter cells; LaTeX math in R Markdown.
Mermaid / diagrams
```mermaid graph TD A --> B ```Source ↗
no
Renders as a plain code block.
yes
Mermaid blocks render as diagrams on github.com.
yes
```mermaid; PlantUML and Kroki also available.
yes
Native Mermaid rendering in notes.
no
Renders as a code block.
no
Renders as a code block.
no
Renders as a code block.
partial
JupyterLab 4.1+ renders ```mermaid natively; R Markdown needs the DiagrammeR package.
Raw HTML
<div>text</div>Source ↗
yes
HTML blocks and inline HTML are part of the spec.
partial
Sanitized subset; scripts and some tags are stripped.
partial
Sanitized subset (e.g. <details> and <br>).
partial
Renders HTML, but Markdown inside HTML is intentionally not processed.
no
HTML renders as literal text.
no
No HTML rendering.
no
Tags render as literal text; only HTML entities work.
partial
Jupyter renders raw HTML; R Markdown passes it to HTML output only.
Spoilers
||hidden text||Source ↗
no
Not in the spec.
partial
No spoiler syntax; <details> HTML gives collapsible sections.
partial
No spoiler syntax; <details>/<summary> HTML.
no
No spoiler syntax.
yes
||text|| hides content until clicked.
no
Not supported.
yes
>!text!< syntax — different delimiters from Discord.
no
Not supported.
Dynamic timestamps
<t:1752840000:R>Source ↗
no
Not in the spec.
no
Not supported.
no
Not supported.
no
Not supported.
yes
<t:unix:format> renders in each viewer’s timezone; seven formats.
partial
Via <!date^unix^text> in app/bot messages (Slack mrkdwn).
no
Not supported.
no
Not supported.
Callouts / alerts
> [!note] > ContentSource ↗
no
Renders as a plain blockquote.
yes
Alerts: NOTE, TIP, IMPORTANT, WARNING, CAUTION.
yes
GLFM alerts (note, tip, warning, caution, important).
yes
13 types with aliases, folding, and nesting.
no
Renders as a plain blockquote.
no
Renders as a plain quote.
no
Renders as a plain blockquote.
no
Quarto (R Markdown’s successor) adds callout blocks; classic R Markdown has none.
Wikilinks
[[Page Name]]Source ↗
no
Not in the spec.
partial
[[links]] resolve in GitHub wiki pages only.
partial
[[Page]] works in wiki pages; regular files and comments do not resolve it.
yes
Vault-native; auto-updates when the target note is renamed.
no
Renders as literal brackets.
no
Not supported.
no
Renders as literal brackets.
no
Renders as literal brackets.
Highlight
==highlighted text==Source ↗
no
Not in the spec.
no
Renders as literal ==.
no
Renders as literal ==.
yes
==text== marker-style highlight.
no
Renders as literal ==.
no
Not supported.
no
Renders as literal ==.
no
Pandoc’s ==mark== extension exists but is off by default.
Comments (hidden text)
%%hidden%%Source ↗
partial
Via <!-- --> HTML comments; hidden but kept in the output source.
yes
GitHub documents hiding content with <!-- --> comments.
partial
No dedicated syntax; <!-- --> HTML comments.
yes
%%comment%% hides text in Reading view and on publish.
no
Not supported.
no
Not supported.
no
Not supported.
partial
<!-- --> hidden in HTML output only.
Code blocks
```js code ```Source ↗
yes
Fenced and indented blocks.
yes
Fenced, with syntax highlighting.
yes
Fenced; 100+ highlight languages.
yes
Fenced, with syntax highlighting.
yes
``` with optional language.
yes
``` or the toolbar code block.
partial
Fenced blocks only on new Reddit; old Reddit supports indented blocks only.
yes
Fenced blocks; R Markdown chunks also execute code.
Blockquotes
> quoted textSource ↗
yes
> at the start of a line.
yes
> at the start of a line.
yes
> at the start of a line.
yes
> at the start of a line.
yes
> for one line; >>> quotes the rest of the message.
yes
> markup or the toolbar.
yes
> at the start of a line.
yes
> at the start of a line.
Images
![alt text](image.jpg)Source ↗
yes
![alt](url) with optional title.
yes
![alt](url); relative paths and uploads supported.
yes
![alt](url); uploads supported.
yes
Plus ![[embeds]] for vault files.
no
Attachments/embeds only; no Markdown image syntax.
no
File uploads only; no Markdown image syntax.
partial
No Markdown image syntax; the rich-text editor supports image uploads.
yes
Standard syntax; Jupyter also supports attachment: references.
Links
[text](https://example.com)Source ↗
yes
Inline, reference, and autolinks.
yes
Inline, reference, and autolinks.
yes
Inline, reference, and autolinks.
yes
Inline links; [[wikilinks]] are the default.
yes
Masked links [text](url) in user messages.
partial
Composer toolbar or paste-to-link; mrkdwn uses <url|text>.
yes
Inline, reference, and autolinks.
yes
Inline links in both.
yes supportedpartial works with caveats or a non-Markdown syntaxno not supported

Download this dataset as CSV, JSON, or Markdown — all generated from the same verified source as this table. Spotted a change? Report a compatibility change ↗

Shareable Image Version

Prefer a picture? Save or share the Markdown cheat sheet as a single image — handy for pinning in team chats, wikis, and study notes.

Markdown cheat sheet infographic: headings, bold, italic, strikethrough, code, links, images, lists, task lists, blockquotes, code blocks, tables, and footnotes with descriptionsDownload image (PNG)

Frequently Asked Questions

What is Markdown?

Markdown is a lightweight markup language for creating formatted text using a plain-text editor. It was created by John Gruber in 2004 and is now one of the most popular markup languages in the world.

Is Markdown the same everywhere?

While core Markdown syntax is consistent across platforms, different platforms (GitHub, Discord, Obsidian, etc.) may support additional features or have slight variations. This is often called "flavored Markdown".

What can I use Markdown for?

Markdown is used for documentation, README files, blog posts, notes, emails, and more. It's supported by GitHub, GitLab, Reddit, Discord, Slack, Notion, Obsidian, and many other platforms.

Do I need special software to write Markdown?

No, you can write Markdown in any plain text editor. However, specialized Markdown editors like VS Code, Obsidian, or Typora provide live preview and additional features.

What are the most common Markdown syntax examples?

The most common Markdown examples are: # Heading for headings, **bold** for bold text, *italic* for italics, [title](url) for links, ![alt](image.jpg) for images, - item for bullet lists, > quote for blockquotes, `code` for inline code, and triple backticks for code blocks.

Is there a printable Markdown cheat sheet PDF?

Yes — click the Download PDF button at the top of this page to get the complete Markdown cheat sheet as a free PDF file you can print or keep offline. No signup or email required.

Related Tools