# Markdown

This Markdown cheatsheet is intended as a quick reference and showcase of the markdown syntax in QOwnNotes.

# Headers

Use headings to structure your texts.

# H1
## H2
### H3
#### H4
##### H5
###### H6
1
2
3
4
5
6

TIP

The Navigation panel shows the structure of your headings.

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1
======

Alt-H2
------
1
2
3
4
5

TIP

By default QOwnNotes creates the filename of a note from the heading 1 (h1).

# Emphasis

Emphasis, aka italics, with *asterisks*.

Strong emphasis, aka bold, with **asterisks**.
1
2
3

TIP

You can use the shortcut Ctrl + B for making text bold and Ctrl + I for making it italic.

# Underline

There also is an optional setting to enable underline rendering in the Preview settings.

_underline_
1

TIP

You can use the shortcut Ctrl + U to underline a text.

# Strike out

~~strike out~~
1

TIP

You can use the shortcut Alt + Shift + S to strike out a text.

# Lists

There are many ways to create lists.

1. First ordered list item
2. Another item
  * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
  1. Ordered sub-list
4. And another item.

* Unordered list can use asterisks
- Or minuses
+ Or pluses
1
2
3
4
5
6
7
8
9
10

TIP

If you press Enter at the end of a list a new list item will be created.

There are multiple ways to create links.

[I'm an inline-style link](https://www.google.com)

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

[You can use numbers for reference-style link definitions][1]

URLs and URLs in angle brackets will automatically get turned into links in the preview. 
http://www.example.com or <http://www.example.com>

[1]: https://www.qownnotes.org
1
2
3
4
5
6
7
8
9
10

TIP

You can use the shortcut Ctrl + L to create links to webpages or other notes.

Using Ctrl + Shift + X will bring up a dialog that helps you to insert attachments into your note.

You can press Ctrl + Space while the cursor in on a link in the note edit to follow the link.

# Bookmarks

The bookmarks used by the QOwnNotes Web Companion browser extension are using links in lists.

- [Webpage name](https://www.example.com) #tag1 #tag2 some description and tags
1

# Images

Images can be embedded into QOwnNotes. They will be shown in the preview.

![alt text](media/my-image.jpg)
1

TIP

You can use the shortcut Ctrl + Shift + I to insert an image into a note. The image can also be in the clipboard, the dialog will detect it and show a preview.

You can also directly paste an image from the clipboard into your note with Ctrl + Shift + V.

# Inline code and code blocks

Inline `code` has `back-ticks around` it.
1

TIP

You can use the shortcut Ctrl + Shift + C on selected inline text or just inside of text to create an inline code block.

Blocks of code are either fenced by lines with three back-ticks, or are indented with four spaces.

# 4-Spaces fence

Add four spaces in front of your code to mark it as code block.

	s = "Code with space indent"
	print s
1
2

# Backtick fence

You can also use three backticks to create a code block.

```
Code goes here
Code goes here
```
1
2
3
4

TIP

You can use the shortcut Ctrl + Shift + C on multiple selected lines of text or in an empty line to create a code block.

# Backtick fence with code highlighting

There also is some syntax highlighting with code blocks in QOwnNotes.

```bash
# I am a comment
cd Notes
```
1
2
3
4

# Tables

Tables aren't part of the core Markdown spec, but the QOwnNotes preview supports them.

Colons can be used to align columns.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

There must be at least 3 dashes separating each header cell.

You can also use inline Markdown.

| Markdown | Less | Pretty |
| --- | --- | --- |
| *Still* | `renders` | **nicely** |
| 1 | 2 | 3 |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

TIP

Press Alt + Shift + T to activate a dialog that can help you creating tables. You can even import CSV files in that dialog.

Use Ctrl + Space inside a markdown table to automatically format it.

# Blockquotes

> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.

Quote break.

> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can *put* **Markdown** into a blockquote. 
1
2
3
4
5
6

TIP

You can tell QOwnNotes to fully highlight blockquotes or just the blockquote character in the Editor settings

You can use the shortcut Ctrl + Shift + B for marking text as blockquote.

# Horizontal rule

There are three ways to get a horizontal rule: hyphens, asterisks or underscores.

Three or more...

Hyphens

---

Asterisks

***

Underscores

___
1
2
3
4
5
6
7
8
9
10
11
12
13

# Line breaks

  • Two newlines will get you a new paragraph.
  • One newline will get you a new line in the same paragraph.
  • To have a line break without a paragraph, you will need to use two trailing spaces.
Here's a line for us to start with.

This line is separated from the one above by two newlines, so it will be a *separate paragraph*.

This line is also begins a separate paragraph, but...  
This line is only separated by two trailing spaces and a single newline, so it's a separate line in the *same paragraph*.
1
2
3
4
5
6

TIP

Trailing spaces are highlighted by default in the editor.

# Comments

Comments are not shown in the preview.

[comment]: # (This comment will not appear in the preview)

<!-- HTML comments are also hidden -->
1
2
3

# Checkbox lists

You can create simple todo lists with checkbox lists.

- [x] done
- [ ] todo
1
2

TIP

You can check/un-check checkboxes in the preview.

# Frontmatter

In QOwnNotes you can use a frontmatter (e.g. YAML) to add some extra meta information. It will not be shown in the preview and will not disturb the the automatic note filename generation.

---
title: Some name
description: Some description
---

# Note headline starts here

Some text
1
2
3
4
5
6
7
8

The filename of this example note would be Note headline starts here.md.