Skip to main content

Quick reference

Markdown cheatsheet

The syntax you will use most often. Each preview uses the same renderer as the editor.

Text and document structure

Start with the building blocks for readable Markdown documents.

Headings

Markdown

# Heading 1
## Heading 2
### Heading 3

Preview

Emphasis

Markdown

**Bold text**
*Italic text*
~~Strikethrough~~

Preview

Links and images

Markdown

[Markdown Lens](https://markdownlens.ayushdev.com)

![Alt text](https://example.com/image.png)

Preview

Blockquotes

Markdown

> Markdown keeps plain text readable.
>
> Add another line with the same marker.

Preview

Lists and tasks

Use indentation to create hierarchy and square brackets to track work.

Ordered and unordered lists

Markdown

- First item
- Second item
  - Nested item

1. Plan
2. Write
3. Review

Preview

Task lists

Markdown

- [x] Draft the README
- [ ] Add examples
- [ ] Request review

Preview

Tables

Separate headers with dashes and columns with vertical bars.

Feature table

Markdown

| Feature | Status |
| --- | ---: |
| Tables | Ready |
| Mermaid | Ready |
| Math | Ready |

Preview

Code

Use backticks for inline code and triple backticks for fenced blocks.

Inline code

Markdown

Run `npm run dev` to start the app.

Preview

Fenced code block

Markdown

```ts
const greeting = "Hello, Markdown!";
console.log(greeting);
```

Preview

Mermaid diagrams and math

Markdown Lens recognizes Mermaid fences and KaTeX-compatible math delimiters.

Mermaid diagram

Markdown

```mermaid
flowchart LR
  A[Write] --> B[Preview]
  B --> C[Publish]
```

Preview

Inline and block math

Markdown

Inline: $E = mc^2$

Block:
$$
\int_0^1 x^2\,dx = \frac{1}{3}
$$

Preview

Ready to try it?

Open an example above to edit it, or start from a file.