---
title: Markdown example, explained
source: https://markdownpaper.app/guides/markdown-example/
---

# Markdown example, explained

This file shows every common part of Markdown, and says how each one is
written. Open it in a Markdown reader to see the result, and in a text editor
to see the symbols that made it. The block at the very top, between the two
`---` lines, is frontmatter: details about the file that readers hide.

## Headings

The line above starts with `##`, which makes a section heading. One `#` makes
the title at the top. Each extra `#` goes one level deeper, down to six.

### A smaller heading

This one starts with `###`.

## Paragraphs

A paragraph is lines of text with an empty line before and after it.
These two lines sit next to each other in the file,
so they join into one paragraph.

This line ends with a backslash\
so the line breaks here without starting a new paragraph.

## Emphasis

Two asterisks make **bold text**. One makes *italic text*. Three make
***bold and italic***. Two tildes make ~~struck through~~ text.

## Lists

Lines starting with `-` make a bullet list:

- Bread
- Milk
  - Indent two spaces to nest a line under the one above
- Eggs

Lines starting with a number and a full stop make a numbered list:

1. Preheat the oven
2. Mix the batter
3. Bake for 25 minutes

## Task list

A `[ ]` after the dash makes a box to tick, and `[x]` makes a ticked one:

- [x] Write the draft
- [ ] Send it for review

## Links

Square brackets hold the text, round brackets hold the address:
[the Markdown guides](https://markdownpaper.app/guides/).

A bare address in angle brackets becomes a link too: <https://example.com>.

## Images

An image is a link with `!` in front. The text in square brackets is
described to people who cannot see the image:

![The MarkdownPaper logo](https://markdownpaper.app/icon-192.png)

## Code

Single backticks show `inline code`. Three backticks on their own lines make a
code block, and the word after the first three names the language:

```python
def greet(name):
    return f"Hello, {name}"
```

## Quotes

A `>` at the start of a line makes a quote:

> Simple things should be simple.

## Callouts

A quote whose first line is `[!NOTE]`, `[!TIP]`, `[!IMPORTANT]`,
`[!WARNING]` or `[!CAUTION]` becomes a highlighted callout on GitHub and in
MarkdownPaper:

> [!TIP]
> Keep this file open next to your own while you learn.

## Tables

Cells are split by `|`. The line of dashes under the first row makes it the
header, and a colon sets the alignment of a column:

| Fruit  | Color  | Price |
| :----- | :----: | ----: |
| Apple  | Red    | $1.20 |
| Banana | Yellow | $0.50 |

## Footnotes

A `[^1]` in the text makes a numbered note[^1], and the note itself can go
anywhere in the file.

[^1]: Footnotes are gathered at the end of the document.

## Horizontal rule

Three dashes on a line of their own draw a line across the page:

---

## Escaping

A backslash before a symbol shows the symbol itself: \*not italic\*, and
\# not a heading.

## Maths and diagrams

Some readers, MarkdownPaper and GitHub among them, also draw maths written
between dollar signs, like $a^2 + b^2 = c^2$, and diagrams written in a
`mermaid` block:

```mermaid
graph LR
  Write --> Read --> Share
```

That is everything. Change anything in this file and look again to see what
your change did.
