Markdown Cheat Sheet

A complete reference for GitHub Flavored Markdown (GFM) syntax — the dialect used by GitHub, VS Code, Notion, and most markdown tools.

Headings

Use # symbols for headings. One # for H1, two for H2, up to six for H6.

SyntaxDescription
# Heading 1Largest heading — use once per page for the title
## Heading 2Section heading
### Heading 3Sub-section heading
#### Heading 4Minor heading
##### Heading 5Small heading
###### Heading 6Smallest heading
# Project Title

## Overview

### Installation

#### Step 1: Install dependencies

Text Formatting

SyntaxDescription
**bold text**Bold
__bold text__Bold (alternative)
*italic text*Italic
_italic text_Italic (alternative)
***bold and italic***Bold and italic
~~strikethrough~~Strikethrough
`inline code`Inline code
<mark>highlight</mark>Highlighted text (HTML)
text<br>new lineLine break within a paragraph
---Horizontal rule
This is **bold**, this is *italic*, and this is ***both***.

~~This text is crossed out.~~

Use `console.log()` for debugging.

Lists

Use -, *, or + for unordered lists. Indent with 2 spaces to nest.

SyntaxDescription
- itemUnordered list item
* itemUnordered list item (alternative)
1. itemOrdered list item
- nestedNested list item (2-space indent)
- Apples
- Bananas
  - Cavendish
  - Plantain
- Cherries

1. First step
2. Second step
3. Third step

Code

Wrap inline code in backticks. Use triple backticks for fenced code blocks, optionally with a language for syntax highlighting.

SyntaxDescription
`code`Inline code
```\ncode\n```Fenced code block
```js\ncode\n```Code block with syntax highlighting
codeIndented code block (4 spaces)
Run `npm install` to get started.

```typescript
function greet(name: string): string {
  return `Hello, ${name}!`;
}

console.log(greet("World"));
```

```bash
npm install
npm run dev
```

Common language identifiers: js, ts, python, bash, sql, json, yaml, html, css, markdown

Tables

Tables are a GFM extension. Use pipes | to separate columns. The second row defines column alignment.

SyntaxDescription
| Col | Col |Table row
|-----|-----|Separator row (required)
|:----|Left-align column
|----:|Right-align column
|:---:|Center-align column
| Name       | Role        | Status   |
|:-----------|:------------|:--------:|
| Alice      | Engineer    | Active   |
| Bob        | Designer    | Active   |
| Carol      | PM          | Away     |

| Item     | Price   |
|:---------|--------:|
| Coffee   |   $3.50 |
| Sandwich |   $8.00 |
| Total    |  $11.50 |

Blockquotes

Use > to create blockquotes. Nest them with multiple > characters.

> This is a blockquote.
> It can span multiple lines.

> **Note:** Blockquotes can contain other markdown.
> - Like lists
> - And **bold text**

> Outer quote
>> Nested quote
>>> Deeply nested

Task Lists

Task lists (checkboxes) are a GFM extension. Use - [ ] for unchecked and - [x] for checked.

- [x] Set up project structure
- [x] Write initial documentation
- [ ] Implement authentication
- [ ] Write tests
- [ ] Deploy to production

Misc

SyntaxDescription
---Horizontal rule (also *** or ___)
\*escaped\*Escape special characters with backslash
<!-- comment -->HTML comment (not rendered)
[^1]Footnote reference
[^1]: textFootnote definition
==highlight==Highlighted text (some parsers)
~subscript~Subscript (some parsers)
^superscript^Superscript (some parsers)

Special characters that need escaping: \ ` * _ { } [ ] ( ) # + - . !

PDF export — themes & typography

The Markdown to PDF toollets you control how your document looks before exporting. Here's a full reference of every option.

Themes

Light

Clean white background, charcoal text. Professional default for most documents.

Dark

Dark background with light text and indigo headings. Great for technical docs and developer output.

Sepia

Warm cream background and amber headings. Easy on the eyes for long-form writing.

Minimal

All borders and decorations stripped away. Maximum whitespace for a clean, distraction-free look.

Ocean

Deep navy background with cyan headings. Bold and modern for presentations and reports.

Font families

FontTypeBest for
System SansSans-serif · SystemDefault OS font stack — crisp at any size, no download needed
Sans SerifSans-serif · SystemHelvetica Neue / Arial stack — clean, universally available
GeorgiaSerif · SystemClassic editorial serif, excellent readability for long text
PalatinoSerif · SystemElegant book-quality serif, great for academic papers
InterSans-serif · GoogleModern UI sans designed for screens — very readable at small sizes
RobotoSans-serif · GoogleAndroid system font, clean and neutral for documentation
Source Sans 3Sans-serif · GoogleAdobe open-source UI sans, balanced and professional
MerriweatherSerif · GoogleHigh-contrast serif built for screen readability
LoraSerif · GoogleContemporary serif with calligraphic roots — elegant reports
Playfair DisplaySerif · GoogleHigh-contrast display serif — impactful headings
JetBrains MonoMonospace · GoogleDeveloper-focused code font, ligatures and clear disambiguity
Fira CodeMonospace · GoogleProgramming ligatures, highly legible for code-heavy docs
Source Code ProMonospace · GoogleAdobe open-source, clean and neutral for technical writing

Style controls

Font size

Range: 10 – 20 px

Default: 14 px

Controls the base body text size. Headings scale proportionally.

Line spacing

Range: 1.2 – 2.5

Default: 1.6

Sets the line-height multiplier. Higher values improve readability for dense text.

Margins

Range: None / Narrow / Normal / Wide

Default: Normal

Controls page padding. Wide (65 px / 100 px) suits printed reports; None suits tight screen layouts.

See the full walkthrough in the Markdown to PDF Guide.

✏️

Practice in the live editor

Try any of this syntax in our free browser-based markdown editor with live preview, formatting toolbar, and auto-save.