Skip to main content
practice.schlesier.ca
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Markdown

Headings

# H1
## H2
### H3
#### H4

Use one # per heading level. Leave a blank line before and after headings for better compatibility.

Text formatting

Result Markdown
Bold **bold**
Italic *italic*
Bold and italic ***bold and italic***
Strikethrough ~~strikethrough~~
Inline code `inline code`

Paragraphs and line breaks

Separate paragraphs with a blank line.

First paragraph.

Second paragraph.

For a hard line break, end the line with two spaces or use <br>.

First line  
Second line

Lists

Unordered lists:

- First item
- Second item
- Third item

Ordered lists:

1. First item
2. Second item
3. Third item

Nested lists:

- Parent item
  - Child item
  - Child item
- Parent item

Task lists:

- [x] Done
- [ ] Not done
[Link text](https://example.com)
[Link with title](https://example.com "Optional title")
<https://example.com>

Reference-style links keep long URLs out of the paragraph.

Read the [docs][docs-link].

[docs-link]: https://example.com/docs

Images

![Alt text](image.png)
![Alt text](image.png "Optional title")

Alt text should describe the image for screen readers and for cases where the image cannot load.

Blockquotes

> A quoted paragraph.
>
> A second quoted paragraph.

Nested blockquotes:

> Outer quote
>
> > Nested quote

Code blocks

Use fenced code blocks with a language name for syntax highlighting.

```bash
echo "hello"
```

```json
{
  "name": "example"
}
```

Indenting by four spaces also creates a code block, but fenced blocks are clearer.

Tables

| Name | Description |
|------|-------------|
| foo  | First item  |
| bar  | Second item |

Alignment:

| Left | Center | Right |
|:-----|:------:|------:|
| A    | B      | C     |

Horizontal rules

---

Use horizontal rules sparingly to separate major sections.

Escaping characters

Use a backslash when you need Markdown syntax to appear as literal text.

\*not italic\*
\# not a heading
\[not a link\]

HTML

Most Markdown renderers allow inline HTML.

This is <mark>highlighted</mark>.

Use HTML only when Markdown cannot express the structure cleanly. Support varies by renderer.

Footnotes

Footnotes are common in GitHub Flavored Markdown and many static site generators.

Here is a claim with a note.[^1]

[^1]: This is the footnote text.

Definition lists

Some renderers support definition lists.

Term
: Definition text

Check your renderer before relying on this syntax.

Common gotchas

  • Put blank lines around headings, lists, blockquotes, and code blocks.
  • Use fenced code blocks instead of indentation for multi-line code.
  • Keep table rows simple; tables are fragile with long text or nested formatting.
  • Prefer descriptive link text over raw URLs in prose.
  • Check renderer-specific features before using footnotes, task lists, or definition lists.