Skip to main content

Markdown Cheat Sheet & Syntax Guide

Copy a working example for the syntax you need, see how it renders, and adapt it for your documentation, READMEs, or notes.

Headings

Add 1 to 6 # symbols before a line. More symbols create a lower-level heading.

Syntax vs Preview
Copyable Syntax
# Heading Level 1
## Heading Level 2
### Heading Level 3
#### Heading Level 4
##### Heading Level 5
###### Heading Level 6
Rendered Preview

Heading Level 1

Heading Level 2

Heading Level 3

Heading Level 4

Heading Level 5
Heading Level 6

Bold, italic, and strikethrough

Wrap text with asterisks, underscores, or tildes to add emphasis or show deleted text.

Syntax vs Preview
Copyable Syntax
This text is *italicized*.
This text is _italicized_ as well.

This text is **bolded**.
This text is __bolded__ as well.

This text is ***bold and italicized***.

This text is ~~strikethrough~~.
Rendered Preview

This text is italicized.

This text is italicized as well.

This text is bolded.

This text is bolded as well.

This text is bold and italicized.

This text is strikethrough.

Ordered, unordered, and task lists

Use numbers for ordered steps, dashes for bullets, and brackets with an x for task checkboxes.

Syntax vs Preview
Copyable Syntax
- Unordered list item 1
- Unordered list item 2
  - Indented nested item

1. Ordered list item 1
2. Ordered list item 2

- [x] Completed task item
- [ ] Incomplete task item
Rendered Preview
  • Unordered list item 1
  • Unordered list item 2
    • Indented nested item
  1. Ordered list item 1
  2. Ordered list item 2
  • Completed task item
  • Incomplete task item

Inline code and fenced code blocks

Use single backticks for inline code and triple backticks with a language tag for blocks.

Syntax vs Preview
Copyable Syntax
Use inline `const value = true` variables.

Fenced code block:
```javascript
const greeting = "Hello, developer!";
console.log(greeting);
```
Rendered Preview

Use inline const value = true variables.

javascript
const greeting = "Hello, developer!";
console.log(greeting);

Tables and column alignment

Use pipes to separate columns and hyphens with colons in the second row to set alignment.

Syntax vs Preview
Copyable Syntax
| Parameter | Type | Default |
| :--- | :---: | ---: |
| format | string | "MD" |
| local | boolean | true |
| threads | number | 4 |
Rendered Preview
Parameter Type Default
format string "MD"
local boolean true
threads number 4

Blockquotes and nested quotes

Begin lines with a greater-than symbol to quote text, call out warnings, or nest thoughts.

Syntax vs Preview
Copyable Syntax
> This is a blockquote element.
>
> > This is nested inside the parent quote.
Rendered Preview

This is a blockquote element.

This is nested inside the parent quote.

Horizontal rules, footnotes, and HTML

Use three dashes for dividers, bracketed caret numbers for footnotes, or inline HTML tags.

Syntax vs Preview
Copyable Syntax
Create dividers with asterisks:
***

Escape characters with backslash:
\* Literal asterisk (not bullet)

Embed keyboard labels:
<kbd>Cmd</kbd> + <kbd>Option</kbd>
Rendered Preview

Create dividers with asterisks:


Escape characters with backslash:
* Literal asterisk (not bullet)

Embed keyboard labels:
Cmd + Option

Frequently Asked Questions

What is Markdown?

Markdown is a lightweight markup language that allows you to format plain text using simple, human-readable symbols like hashes, asterisks, and dashes.

Is GitHub-flavored Markdown (GFM) supported?

Yes. This reference and the built-in editor support task lists, tables, strikethrough, autolinks, and fenced code blocks with syntax highlighting.

How do I add a line break in Markdown?

End a line with two or more spaces before pressing Enter, or leave a full blank line to start a new paragraph.

Can I write raw HTML inside Markdown?

Yes. Most Markdown renderers allow standard HTML tags for layout or elements not natively supported in standard Markdown syntax.