Markdown Cheatsheet


updated: 06.08.2024

Headers

# H1
## H2
### H3
#### H4
##### H5
###### H6

H1

H2

H3

H4

H5
H6

Emphasis

*Italic* or _Italic_
**Bold** or __Bold__
~~Strikethrough~~

Italic or Italic
Bold or Bold
Strikethrough

Lists

Unordered

- Item 1
- Item 2
  - Subitem 1
  - Subitem 2

Ordered

1. First item
2. Second item
3. Third item
   1. Subitem 1
   2. Subitem 2
  1. First item
  2. Second item
  3. Third item
    1. Subitem 1
    2. Subitem 2
[Link Text](https://example.com)

Link Text

Images

![Alt Text](https://example.com/image.jpg)

Alt Text

Blockquotes

> This is a blockquote.

This is a blockquote.

Code

Inline Code

`inline code`

inline code

Code Block

Code block

Highlighting

Currently can be used with: Javacript, php, json, html, xml...
If needed it can be extended on prismjs.com

Usage in code block:

```Javascript
function sample() {
....

function sample() {
let test = false;
return false;
}

Tables

| Header 1 | Header 2 |
|----------|----------|
| Row 1 Col 1 | Row 1 Col 2 |
| Row 2 Col 1 | Row 2 Col 2 |
Header 1 Header 2
Row 1 Col 1 Row 1 Col 2
Row 2 Col 1 Row 2 Col 2

Horizontal Rule

---

Line Breaks

To create a line break (a new line without a paragraph break), end a line with two or more spaces:
Line one
Line two

Escaping Characters

To display a literal character that would otherwise be interpreted as Markdown, use a backslash:

\*Not Italic\*
\# Not a header

*Not Italic*
# Not a header

Checklists

- [ ] Task 1
- [x] Task 2

Combining Elements

### Header with **bold** text

1. Ordered list item with `inline code`
2. Another item
   > Blockquote inside a list item

Header with bold text

  1. Ordered list item with inline code
  2. Another item

    Blockquote inside a list item

Alert boxes

implemented 4 different Alert boxes in toc plugin, more can be added in index.php (kirbytext:before).
usage:

> [!ALERT_NAME] YOUR MESSAGE.
  1. > [!WARNING]

    This is a Warning message.

  2. > [!NOTE]

    This is a Note message.

  3. > [!TIP]

    This is a Tip message.

  4. > [!IMPORTANT]

    This is a Important message.