Back to Markdown Lens

Quick reference

Markdown cheatsheet

The syntax you will use most often, paired with clear rendered examples. Copy a snippet, adapt it, and preview it in Markdown Lens.

Text and document structure

Start with the building blocks for readable Markdown documents.

Headings

Markdown

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

Rendered

Heading 1

Heading 2

Heading 3

Emphasis

Markdown

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

Rendered

Bold text

Italic text

Strikethrough

Links and images

Markdown

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

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

Rendered

Markdown Lens
Image renders here, with “Alt text” as its accessible description.

Blockquotes

Markdown

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

Rendered

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

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

Rendered

  • First item
  • Second item
    • Nested item
  1. Plan
  2. Write
  3. Review

Task lists

Markdown

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

Rendered

  • Draft the README
  • Add examples
  • Request review

Tables

Separate headers with dashes and columns with vertical bars.

Feature table

Markdown

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

Rendered

FeatureStatus
TablesReady
MermaidReady
MathReady

Code

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

Inline code

Markdown

Run `npm run dev` to start the app.

Rendered

Run npm run dev to start the app.

Fenced code block

Markdown

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

Rendered

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

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]
```

Rendered

Write
Preview
Publish

Inline and block math

Markdown

Inline: $E = mc^2$

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

Rendered

Inline: E = mc²

∫₀¹ x² dx = ⅓

Ready to try it?

Paste any example into the editor to see GitHub-flavored Markdown, Mermaid, code highlighting, and math render together.

Open Markdown Lens